Adding "Find Last Row" to a Range

Hi all,

I am trying to copy and paste a download into another excel. The downloaded file will have different rows based on the source data.

I figured out how to find the last row number and I named that “Last_Data_Row”. Now I’m trying to add that number to my Copy and paste range.

I’ve tried
SourceData.Sheet("Source Data "+DateTime.Now.ToString(“dd-MM-yyyy”)).Range(“A2:E”+(Last_Data_Row.toString))

That is not working.

I’ve played with quotes and parenthesis but I am brand new to StudioX and admittedly don’t know what I’m doing.

I’d appreciate any advice.

Thank you in advance,
Kit

@kit.fintzel - On the write cell…I have used the Last Row value like this…

You can easily find this by Write Line

Hope this will give you a little clue…

Thank you for your response.
I’m afraid I don’t understand your answer (I am very new to StudioX).

When I write Range(“A2:E8”) it works. But the range will change with every review.

I used the Find First/Last Data Row activity. I only care about the Last Data Row. I named that output Last_Data_Row.
If I do a Message Box using a Saved Value for Last_Data_Row is comes up with 8 or 12 or whatever.
I don’t know how put that number into my Range.

@kit.fintzel - Check this workflow…StudioX_FindLastRow_Excel.zip (106.8 KB).

Run this workflow as is, you will see it will write “Test” at the B33 cell…which is the LastRow+1 …

Hi,

Yes - it works. How do I put that “LastRowPlusOne” into a Range?
I’m sorry. I feel like I just don’t understand what you are trying to teach me.

Thank you!

@kit.fintzel - Please do me a favor…Please use write Line and add you LastRow variable…after adding Click on the plus sign and choose advance editor and show me what you got…we will go step by step…

Also, if possible please share the workflow screenshot which show some 2-4 activities…i would like to see the flow …

That’s odd - It’s a saved value (see list on the right) but it’s not allowing me to grab it for the Write Line. It gives me the option for the other 2 saved values but not for this one.

That’s fine…Now click on the Plus and choose advance editor and check the lastrow value…

image

You have to type the as shown in your Copy range…

Let me add something in Copy Range and will share with you…

BTW…your screenshot is not clear…

@kit.fintzel - StudioX_FindLastRow_Excel.zip (108.1 KB) . Please take a look here…