Hello,
I have small VBA macro that copies a few lines of some variable data and then goes to another spreadsheet, finds the last row of data and then pastes the values into the next row. Since my original dat can be 1-10 rows of data with formulas in each cell, sometimes there's up to 10 rows of data and other times there's only one row of data. The rows without data have formulas such as =If(A2="","",A2) and I am copying this and then special pasting the values into the 2nd sheet. The problem is, even though I'm pasting rows with blank cells, when I later go back and look for the last row of data, it thinks there's data in the blank cells where I just pasted "" or nothing into them. How can i prevent these blank rows from looking like they contain data?
This is the line of code I'm using to find the last blank row:
NextRow = Range("A65536").End(xlUp).Row + 1
Range("A" & NextRow).Select
I have small VBA macro that copies a few lines of some variable data and then goes to another spreadsheet, finds the last row of data and then pastes the values into the next row. Since my original dat can be 1-10 rows of data with formulas in each cell, sometimes there's up to 10 rows of data and other times there's only one row of data. The rows without data have formulas such as =If(A2="","",A2) and I am copying this and then special pasting the values into the 2nd sheet. The problem is, even though I'm pasting rows with blank cells, when I later go back and look for the last row of data, it thinks there's data in the blank cells where I just pasted "" or nothing into them. How can i prevent these blank rows from looking like they contain data?
This is the line of code I'm using to find the last blank row:
NextRow = Range("A65536").End(xlUp).Row + 1
Range("A" & NextRow).Select