Hi can anyone help me in getting the desired output?
I need to retrieve the last row values from an excel and copy the data from the cells onto separate worksheet into two different columns. Best Regards
Hi can anyone help me in getting the desired output?
I need to retrieve the last row values from an excel and copy the data from the cells onto separate worksheet into two different columns. Best Regards
Once you got the LastRow of specific column, you can use the following code to get the value of cells you want:
For Eg: If A is the specific column and variable LastRow contains the row count then,
strA = Range("A" & LastRow).Value
strB = Range("A" & LastRow).Offset(0, 3).Value
Where, If LastRow = 5, strA contains the value of cell A5 and using offset strB contains the value of cell D5