detect cell value

  • Thread starter Thread starter crapit
  • Start date Start date
C

crapit

Wat do I use to detect cell contain the word "Actual" and assign the row to
a variable which I can use latter on?
 
Hi
you may explain with some more detail what you mean with 'variable
assignment' and what you want to do later on
 
Hi
try the following macro:
Sub hide_rows()
Dim lastrow As Long
Dim row_index As Long
Application.ScreenUpdating = False
lastrow = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Row
For row_index = lastrow - 1 To 1 Step -1
If Cells(row_index, 1).Value="Actual" then
rows(row_index).hidden=true
End If
Next
Application.ScreenUpdating = True
End Sub
 
Hi
what do you men with does not work?
This searches for the value 'Actual' in column A and works for me
 
I get wat you mean, but only cell A1 can be detected, but i have quite a
number of cell that contain "Actual"
 
Hi
now I'm confused?. The code should run through column A and hide all
rows which have the text 'Actual' in column A. If this is NOT what you
want please describe with more detail what you expect
 
Anyway, I had roughly figure out how it work! How do I calculate the total
no, of worksheets in a workbook?
 
Back
Top