Hi,
Can one use AND in a while wend statement:
When I use this statement, it does not read the AND statement, so even though there is data in my last column it exits the loops.
Not too sure what I am doing wrong, or if I should not be using While and AND in the same statement.
Any advice would be appreciated.
Thank you
Can one use AND in a while wend statement:
While Sheets(DataSheetName).Cells(countCol, 1) <> "" And Sheets(DataSheetName).Cells(countCol, 3) <> "" And Sheets(DataSheetName).Cells(countCol - 1, 1) <> ""
When I use this statement, it does not read the AND statement, so even though there is data in my last column it exits the loops.
Not too sure what I am doing wrong, or if I should not be using While and AND in the same statement.
Any advice would be appreciated.
Thank you
Immediate Window results are:
?sheets(DataSheetName).Cells(countCol - 1, 1)
PartyKey
?Sheets(DataSheetName).Cells(countCol, 1)
False
? Sheets(DataSheetName).Cells(countCol, 3)