chriscusick
Technical User
Hi,
I was asked to post here by SkipVought, as I posted this in another forum but think it was the wrong one.
I have a spreadsheet that I need to do 6 conditional formats on. I realize this needs to be done in VBA but I have NEVER used VBA before so I'm at a loss.
What I need the vba to do is check the text in cell A1 and if it meets a certain criteria colour cells a1 - j1 a certain colour. The code needs to change the cells for the relevant criteria.
The other criteria are also in cell a1, in drop down form.
If it helps, the criteria are:
"To be booked", "Booked", "Done", "Invoiced", "Paid", "Cancelled"
So, for example, if cell A1 = "DONE" then cells A1-J1 would turn green. If Cell A1 = "Cancelled" it would color the cells Red, so on and so forth.
I was asked by SkipVought to record a macro, which is below this body of text, but I am not sure if it is correctly recorded in the sense that it changed the colours but there is no information on the status change (the criteria I need the formatting for)
The code would need to go down as far as row 150, as this is as many rows as i would be using
Is there anyone who could actually write this out for me as I have NO programming experience in VBA and wouldn't even know where to start adapting one of the examples from other threads.
Thank you all in advance
Sub Macro3()
'
' Macro3 Macro
' Macro recorded 23/04/2013 by Chris
'
'
Range("A1:J1").Select
With Selection.Interior
.ColorIndex = 36
.Pattern = xlSolid
End With
Range("A1:J1").Select
Selection.Interior.ColorIndex = 44
Selection.Interior.ColorIndex = 35
Selection.Interior.ColorIndex = 37
Selection.Interior.ColorIndex = 4
Selection.Interior.ColorIndex = 3
Selection.Font.Bold = True
End Sub
I was asked to post here by SkipVought, as I posted this in another forum but think it was the wrong one.
I have a spreadsheet that I need to do 6 conditional formats on. I realize this needs to be done in VBA but I have NEVER used VBA before so I'm at a loss.
What I need the vba to do is check the text in cell A1 and if it meets a certain criteria colour cells a1 - j1 a certain colour. The code needs to change the cells for the relevant criteria.
The other criteria are also in cell a1, in drop down form.
If it helps, the criteria are:
"To be booked", "Booked", "Done", "Invoiced", "Paid", "Cancelled"
So, for example, if cell A1 = "DONE" then cells A1-J1 would turn green. If Cell A1 = "Cancelled" it would color the cells Red, so on and so forth.
I was asked by SkipVought to record a macro, which is below this body of text, but I am not sure if it is correctly recorded in the sense that it changed the colours but there is no information on the status change (the criteria I need the formatting for)
The code would need to go down as far as row 150, as this is as many rows as i would be using
Is there anyone who could actually write this out for me as I have NO programming experience in VBA and wouldn't even know where to start adapting one of the examples from other threads.
Thank you all in advance
Sub Macro3()
'
' Macro3 Macro
' Macro recorded 23/04/2013 by Chris
'
'
Range("A1:J1").Select
With Selection.Interior
.ColorIndex = 36
.Pattern = xlSolid
End With
Range("A1:J1").Select
Selection.Interior.ColorIndex = 44
Selection.Interior.ColorIndex = 35
Selection.Interior.ColorIndex = 37
Selection.Interior.ColorIndex = 4
Selection.Interior.ColorIndex = 3
Selection.Font.Bold = True
End Sub