Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
I would liketo create a spreasheet that will highlight the value in the first
column if there ia value in another column of the same row. |
#2
![]() |
|||
|
|||
![]()
Sub Test
Dim iLastRow As Long Dim i As Long For i = 1 To UsedRange.Rows.Count If Application.Count(Range("B" & i).Resize(,255)) 0 Then Cells(i,"A").Interior.Colorindex = 36 End If Next i End Sub -- HTH Bob Phillips "Rebecca Shearer" <Rebecca wrote in message ... I would liketo create a spreasheet that will highlight the value in the first column if there ia value in another column of the same row. |
#3
![]() |
|||
|
|||
![]()
Could you give me a little more instructions with this Macro? Where am I
suppose to insert the lines to be used? Thanks. rebecca "Bob Phillips" wrote: Sub Test Dim iLastRow As Long Dim i As Long For i = 1 To UsedRange.Rows.Count If Application.Count(Range("B" & i).Resize(,255)) 0 Then Cells(i,"A").Interior.Colorindex = 36 End If Next i End Sub -- HTH Bob Phillips "Rebecca Shearer" <Rebecca wrote in message ... I would liketo create a spreasheet that will highlight the value in the first column if there ia value in another column of the same row. |
#4
![]() |
|||
|
|||
![]()
Hi Rebecca,
Thinking about this, I now think it is better to use conditional formatting. Select A1 through to An for all relevant rows Menu FormatConditional Formatting Change Condition 1 to Formula Is Add this formula =COUNTA(B1:IV1)0 Click Format Select the pattern tab Choose an acceptable highlight colour OK OK Should now work okay -- HTH Bob Phillips "Rebecca Shearer" wrote in message ... Could you give me a little more instructions with this Macro? Where am I suppose to insert the lines to be used? Thanks. rebecca "Bob Phillips" wrote: Sub Test Dim iLastRow As Long Dim i As Long For i = 1 To UsedRange.Rows.Count If Application.Count(Range("B" & i).Resize(,255)) 0 Then Cells(i,"A").Interior.Colorindex = 36 End If Next i End Sub -- HTH Bob Phillips "Rebecca Shearer" <Rebecca wrote in message ... I would liketo create a spreasheet that will highlight the value in the first column if there ia value in another column of the same row. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel macro that opens new MS Word file and pastes data as a pictu | Excel Worksheet Functions | |||
Can't find macro in an Excel file to delete it | Excel Discussion (Misc queries) | |||
Saving Excel using Macro | Excel Discussion (Misc queries) | |||
How can I edit cell contents with a macro in Excel? | Excel Discussion (Misc queries) | |||
Problem Editing Macro in Shared Excel File | Excel Discussion (Misc queries) |