• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Excel for Operations Management Course
    • Excel for Decision Making Under Uncertainty Course
    • Excel for Finance Course
    • Excel Analysis ToolPak Course
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member
  • Login

How to Highlight Celestial Color a Column Cell (G6: G) If Cell on Same Row of Column (B6: B) Insert Something of Text Type|VBA & Macros|Excel Forum|My Online Training Hub

You are here: Home / How to Highlight Celestial Color a Column Cell (G6: G) If Cell on Same Row of Column (B6: B) Insert Something of Text Type|VBA & Macros|Excel Forum|My Online Training Hub
Avatar
sp_LogInOut Log In sp_Registration Register
sp_Search Search
Advanced Search
Search
Forum Scope




Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Search Search
sp_RankInfo
Lost password?
sp_CrumbsHome HomeExcel ForumVBA & MacrosHow to Highlight Celestial Color a …
sp_PrintTopic sp_TopicIcon
How to Highlight Celestial Color a Column Cell (G6: G) If Cell on Same Row of Column (B6: B) Insert Something of Text Type
Avatar
A.Maurizio
Member
Members
Level 0
Forum Posts: 213
Member Since:
June 26, 2016
sp_UserOfflineSmall Offline
1
December 17, 2018 - 2:04 am
sp_Permalink sp_Print

Hello everyone My name is Maurizio and my problem is this: I thought that after all this time of having understood almost everything about vba, but as far as I can see I still lose myself in a glass of water.
So the problem is this: I would like to do what: Whenever I insert any Data in Column (B) that goes from Cell (B6: B35)
"Letters", "Numbers" etc ...!
La Colonna (G) It should be highlighted with the Celeste color
But only logically following the line of the data that I enter in the Column (B) all here!
I tried to put this formula on my own, but it keeps giving me error because and how I can solve this problem always using the VBA.
("X = ActiveCell.Range (" B6: G35 "). Value

If Range ("B" & X & ":: B"). Value = 0 Then
Range ("G6: G"). Interior.Color = RGB (0, 255, 255)
else
Range ("G6: G"). Interior.Color = RGB (242, 242, 242)
Exit Sub
End If ")

Thanks Greetings and Happy Weekend to Everyone by A.Maurizio

Avatar
SunnyKow
Puchong, Malaysia

VIP
Members


Trusted Members
Level 8
Forum Posts: 1432
Member Since:
June 25, 2016
sp_UserOfflineSmall Offline
2
December 17, 2018 - 12:32 pm
sp_Permalink sp_Print

Hi Maurizio

Why don't you use a Conditional Formatting?

In the attached I first set the default color for column G to RGB (0,255,255)

I then set the Conditional Formatting that will format the cell in column G if you enter any value (even a 0) in column B (same row) to RGB (242,242,242)

Hope this helps.

Sunny

Avatar
SunnyKow
Puchong, Malaysia

VIP
Members


Trusted Members
Level 8
Forum Posts: 1432
Member Since:
June 25, 2016
sp_UserOfflineSmall Offline
3
December 17, 2018 - 2:01 pm
sp_Permalink sp_Print

Hi Maurizio

If you need a macro then try this:

Sub FormatCell()

Dim i As Long

For i = 6 To 35
    If Cells(i, 2) <> "" Then
        Cells(i, 7).Interior.Color = RGB(0, 255, 255)
    Else
        Cells(i, 7).Interior.Color = RGB(242, 242, 242)
    End If
Next

End Sub

 

Sunny

Avatar
A.Maurizio
Member
Members
Level 0
Forum Posts: 213
Member Since:
June 26, 2016
sp_UserOfflineSmall Offline
4
December 17, 2018 - 7:16 pm
sp_Permalink sp_Print

Hello SunnyKow as always you are able not only to amaze me with your skill; But also to overcome yourself.
They are both fantastic !!!!!!!!!
Although I always favor the VBA.
And this is fantastic.
Thank you so much and certainly this year I think that no longer have to ask you anything, for here I salute you and thank you so much for your madness; We will feel further for the greetings of happy holidays.
For the moment Thanks Thanks Thanks: Greetings from A.Maurizio

Avatar
SunnyKow
Puchong, Malaysia

VIP
Members


Trusted Members
Level 8
Forum Posts: 1432
Member Since:
June 25, 2016
sp_UserOfflineSmall Offline
5
December 19, 2018 - 6:49 pm
sp_Permalink sp_Print

Hi Maurizio

You are welcome and Merry Christmas.

Sunny

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Martin Delloca, Tracy English
Guest(s) 12
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 880
Purfleet: 414
Frans Visser: 346
David_Ng: 306
lea cohen: 237
Jessica Stewart: 219
A.Maurizio: 213
Aye Mu: 201
jaryszek: 183
Newest Members:
Rob Rooth
Tom Lewis
Jennifer Rodriguez-Avila
Khaled Ibrahim
Kiran Supekar
Lisa Myers
Ronald White
Ginette Guevremont
Taryn Ambrosi
Mark Davenport
Forum Stats:
Groups: 3
Forums: 24
Topics: 6531
Posts: 28604

 

Member Stats:
Guest Posters: 49
Members: 32822
Moderators: 2
Admins: 4
Administrators: Mynda Treacy, Philip Treacy, Catalin Bombea, FT
Moderators: Velouria, Riny van Eekelen
© Simple:Press —sp_Information

Sidebar

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel Office Scripts
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
microsoft mvp logo
trustpilot excellent rating
Secured by Sucuri Badge
MyOnlineTrainingHub on YouTube Mynda Treacy on Linked In Mynda Treacy on Instagram Mynda Treacy on Twitter Mynda Treacy on Pinterest MyOnlineTrainingHub on Facebook

Sign up to our newsletter and join over 400,000
others who learn Excel and Power BI with us.

 

Company

  • About My Online Training Hub
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate
  • Sponsor Our Newsletter

Support

  • Contact
  • Forum
  • Helpdesk - For Technical Issues

Copyright © 2023 · My Online Training Hub · All Rights Reserved. Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.