0

Hi, just a quick question..

say a user enters a number in a cell how would i be able to get all cells that contained that number to be highlighted?

Thanks

4
Contributors
4
Replies
5
Views
8 Years
Discussion Span
Last Post by GRMondie
0

you want it to be highlighted so you can get the sum or what? if you just want to get the sum let's say user enter number from rows a1:a3, at row a4.. click of the formula button and choose the sum formula..or you can enter the formula manually such as: =SUM(A1:A3).

but if you just want to highlight then you can use this macro. hope it helps ;)

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 11/27/2009 by cguan_77
'

Dim Lastrow, i As Integer

Lastrow = ActiveSheet.UsedRange.Rows.Count
   
 For i = 1 To Lastrow
    Cells(i, 1).Select
    With Selection.Interior
        .ColorIndex = 5
        .Pattern = xlSolid
    End With
 Next
         
End Sub
0

I managed to resolve the problem with an online tutorial I found but thanks for the reply anyway :)

Edited by firefly91: n/a

-1

I have another question if some one could help me How the filters works in the Excel. Can some one help me in this case?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.