Have a macros that takes a previous row of info and copies it to the next row. I want to add an if statment to it that checks for blank cells before it does the copy thing.
Here's what I tried. Basically, what I'm trying to write is select last row, check for columns for blanks, if blank, msg saying stop, otherwise, copy the row.
myrow = Range("A65536").End(xlUp).row 'select last available row
If Range("A" & myrow & ":L" & myrow).Value = "" Then
MsgBox "Add Data to Columns A through L before adding a new row", vbCritical, "Shop Drawing Summary"
Else
'Add a new row
I get a type mismatch on the 'if' line. Help would be appreciated.
Here's what I tried. Basically, what I'm trying to write is select last row, check for columns for blanks, if blank, msg saying stop, otherwise, copy the row.
myrow = Range("A65536").End(xlUp).row 'select last available row
If Range("A" & myrow & ":L" & myrow).Value = "" Then
MsgBox "Add Data to Columns A through L before adding a new row", vbCritical, "Shop Drawing Summary"
Else
'Add a new row
I get a type mismatch on the 'if' line. Help would be appreciated.