Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello to all, this is the scenario: l have 60 sheets in a workbook, 56
of them are named S1, S2, S3 etc etc up to S56, what l want to do is check a range on each sheet for any blank cells, my problem is that the range changes on each sheet... this is what l have so far (some code borrowed from a post by Nick Hodge, thanks Nick)...the start address of the range will be the same on each sheet which is "A3" the end of the range will be the last used cell in col AS.. this is where l am beat... the last cell in col AS changes on each sheet... it would be nice if it did find any cell with lost data to tell me what the cell address was, as some of these sheets carry a lot of data... Thans for any help....seeya ste Public Sub checkforlostdata() Dim myCell As Range Dim endofrange As Variant For sheetnumber = 1 To 2 sheetname = "S" & Format(sheetnumber, "##0") Sheets(sheetname).Select ActiveSheet.Range("AS1").End(xlDown).Select ActiveCell.cell.Address = endofrange For Each myCell In ActiveSheet.Range("A3:endofrange") If IsEmpty(myCell.Value) Then MsgBox "There is lost data on sheet " & sheetname Cancel = True Exit Sub End If Next myCell Next End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Variable Range for NPV | Excel Worksheet Functions | |||
how to specify a range that is variable. | Excel Worksheet Functions | |||
variable range | New Users to Excel | |||
Variable in Range | Excel Discussion (Misc queries) | |||
Problem trying to us a range variable as an array variable | Excel Programming |