Hi
I have a loop which loops through a cell range and checks multiple things and returns results in multiple columns within a another sheet.
Code:
Nrow = 2
For Each cell In Sheets("PPIIIFORM").Range("F4:U644")
If cell.Value <> "" Then Sheets("Input_Reference_Table").Cells(Nrow, 1).Value = cell.Value
Sheets("Input_Reference_Table").Cells(Nrow, 12).Value = Not cell.Interior.Color = RGB(217, 217, 217)
Sheets("Input_Reference_Table").Cells(Nrow, 14).Value = cell.Interior.Color = RGB(255, 255, 0)
Sheets("Input_Reference_Table").Cells(Nrow, 11).Value = cell.Column
If Right(cell.NumberFormat, 1) = "%" Then
Sheets("Input_Reference_Table").Cells(Nrow, 9).Value = "%10.0f%%"
ElseIf Right(cell.NumberFormat, 1) = "0.000%" Then
Sheets("Input_Reference_Table").Cells(Nrow, 8).Value = ParseNFmt(cell.NumberFormat)
ElseIf Right(cell.NumberFormat, 1) = "0.000" Then
Sheets("Input_Reference_Table").Cells(Nrow, 8).Value = ParseNFmt2(cell.NumberFormat)
Else
Sheets("Input_Reference_Table").Cells(Nrow, 9).Value = "%10.0f%"
End If
Nrow = Nrow + 1
Application.StatusBar = cell.Address
Next cell
I need add a line of code to the above code so for each cell its returns in the column H in sheet Input_Reference_Table "(the value in corresponding cell in column E) & " - " & (first row of the corresponding column)"
However i am not sure how to do this in a loop, Does anyone know?
Thanks
Jeskit