Hi All,
Prior to getting to this stage;- a number of cells have already been selected.
- Sheets(MySheetName).Range("A3") adds up those cells that = "#N/A Requesting Data..."
"c" in the code below is referring to these pre-selected cells.
What I was hoping to do was;- if the cell value is not "#N/A Requesting Data..." de-select the cell
- for remaining cells that are selected, calculate those cells
- continue to loop until Sheets(MySheetName).Range("A3") is 0.
Currently the code calculates all cells;
Sub Verify_Update()
MySheetName = Sheets("Main").Range("C37").Value & "_Data"
Sheets(MySheetName).Range("A3").Calculate
If Sheets(MySheetName).Range("A3").Value <> 0 Then
Dim c As Range
For Each c In Selection.Cells
If c.Value = "#N/A Requesting Data..." Then
Sheets(MySheetName).Calculate
Call Application.OnTime(Now + TimeValue("00:00:05"), "Verify_Update")
Exit Sub
End If
Next c
Else: Sheets("List").Range("H1").Value = Sheets("List").Range("H1").Value + 1
Call Copy_Data
End If
End Sub
Any help would be great!
Thanks
Bookmarks