Hi all
I have sheets("data") and want macro to do that: Check data if wrong will copy to sheet("false"), check each 10 rows and again to last row have data (i = 3, i = 13, i = 23.. and continous)
Please help me to do that with VBA code. Thanks./.
I have sheets("data") and want macro to do that: Check data if wrong will copy to sheet("false"), check each 10 rows and again to last row have data (i = 3, i = 13, i = 23.. and continous)
Code:
x = 1 to last row in sheets("false")
With sheets("data")
For each row i = 3 to lasrow
For each columns j = 5 to 15
if .cells(i,j).value <> Sum(.cells(i+1,j);.cells(i+10;j)) then Sheets("false").Range("Ax").value = .range("Ai") & " column"& j
if .cells(i,j).value <> Sum(.cells(i,5);.cells(i,15)) then Sheets("false").Range("Ax").value = .range("Ai") & " row"& i
Next j
Next i = i +10