Need to color specific cells on another sheet automatically

csteps

Board Regular
Joined
May 19, 2020
Messages
60
Office Version
  1. 365
Platform
  1. Windows
Need the cells listed in yellow to color those cells on another sheet automatically
1590022749417.png
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
What column are these in on the current sheet ?
Which sheet does it have to change on ?
What color do they need to be ?

So, more information is required !!!
 
Upvote 0
Here is more information:
K Column /// Needs to be change to (Visual) /// Any color but blue works
-Thanks for the help
 

Attachments

  • Annotation 2020-05-20 214923.png
    Annotation 2020-05-20 214923.png
    163.9 KB · Views: 5
Upvote 0
Try
VBA Code:
Sub MM1()
Dim lr As Long, r As Long, str As String
lr = Cells(Rows.Count, "K").End(xlUp).Row
For r = 6 To lr
    str = Cells(r, "k").Value
    Sheets("Visual").Range(str).Interior.Color = vbRed
Next r
End Sub
 
Upvote 0
Just in case you have an invalid cell range
VBA Code:
Sub MM1()
Dim lr As Long, r As Long, str As String
lr = Cells(Rows.Count, "K").End(xlUp).Row
On Error GoTo err:
For r = 6 To lr
    str = Cells(r, "k").Value
    Sheets("Visual").Range(str).Interior.Color = vbRed
Next r
err:
MsgBox "Incorrect address @ " & Cells(r, "k").Address & " !!"
End Sub
 
Upvote 0
Thanks for the help,
The 1st VBA worked for the [ K6 ] but did not work for the rest in column k
The second gives the following error:
1590027996435.png
 
Upvote 0
It works fine for me.....
Do you have a range "ALQ10:ALV10" on the Visual Sheet
OR check to make sure there are no spaces in that cell...leading / trailling or in between !
 
Upvote 0
How did you arrive at the values in Col "K" ?
If a formula can you post the formula please !
 
Upvote 0
Did you check all of those columns for unnecessary spaces?
Try changing the formula to
Rich (BB code):
=TRIM(CONCATENATE(E7,J7,I7))
 
Upvote 0

Forum statistics

Threads
1,212,933
Messages
6,110,751
Members
448,295
Latest member
Uzair Tahir Khan

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top