So I want to check if IsEmpty is truly empty within the loop. I tried the below but get a compile error. What did I do wrong?
Formula:
Do While Not IsEmpty(Cells(i, 1))
If Not IsEmpty(Cells(i, 1) Then
'DO STUFF
End If
Loop
So I want to check if IsEmpty is truly empty within the loop. I tried the below but get a compile error. What did I do wrong?
Formula:
Do While Not IsEmpty(Cells(i, 1))
If Not IsEmpty(Cells(i, 1) Then
'DO STUFF
End If
Loop
Hi, nikko50,
maybe you donīt tell us that an error (which one?) occurred but what you want to do.
Searching for empty cells within Column Ae?
![]()
Sub Sample() On Error Resume Next Range("A1:A" & Cells(Rows.Count, "A").End(xlUp).Row).SpecialCells(xlCellTypeBlanks).Value = "Test" End Sub
Use Code-Tags for showing your code: [code] Your Code here [/code]
Please mark your question Solved if there has been offered a solution that works fine for you
Get syntax error at line "If Not IsEmpty(Cells(i, 1) Then"
Basically I have code within the Do Loop that I want to not execute if the loop has reached it's final loop. How can I do this?
Hi, nikko50,
![]()
For lngCounter = 2 To Cells(Rows.Count, "A").End(xlUp).Row
Ciao,![]()
For Each rngCell in Range("A1:A" & Cells(Rows.Count, "A").End(xlUp).Row).SpecialCells(xlCellTypeConstants, 23)
Holger
Cross-posted at http://www.mrexcel.com/forum/excel-q...t-isempty.html
Entia non sunt multiplicanda sine necessitate
Hello nikko50,
Forum Rule #8:
Don't cross-post without a link. Cross-posting is when you post the same question in other forums on the web. You'll find people are disinclined to respond to cross-posts because they may be wasting their time solving a problem that has been solved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post. Expect cross-posts without a link to be closed.
Thank Shg for posting the link for you. Please remember do so in future post.
The syntax error is caused from not closing the statement properly.
Code Is...
Code should be...![]()
If Not IsEmpty(Cells(i, 1) Then
![]()
If Not IsEmpty(Cells(i, 1)) Then
Sincerely,
Leith Ross
Remember To Do the Following....
1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.2. Thank those who have helped you by clicking the Starbelow the post.
3. Please mark your post [SOLVED] if it has been answered satisfactorily.
Old Scottish Proverb...
Luathaid gu deanamh maille! (Rushing causes delays!)
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks