cancel
Showing results for 
Search instead for 
Did you mean: 

How do I write the expression for Cell reference if the end cell is variable

Fran.Woodcock
Level 4

Hi all

Can anyone help me work out an expression?

I am using the MS Excel VBP (v10.1.10) and the Copy & Paste Worksheet Range action.  My Excel spreadsheet end cell will change so I have included a Get Number of Rows action to get the end cell number, but I am stuck in trying to write the expression of the Ranges in the C&P action

This is my overall object:

This is the Copy & Paste action open:

I get the exception thrown as this which is vague as anything... but stepping through the VBO doesn't make it any clearer (to me)...

Many thanks

Fran



------------------------------
Fran Woodcock
------------------------------
2 REPLIES 2

MichealCharron
Level 8

@Fran.Woodcock

I think your forgot to concatenate the row number onto your string rather then include the Data Item name inside the string. The "Destination Range" parameter should have been:

"A1:BJ" & [Adhocs number of rows]


------------------------------
Micheal Charron
Senior Manager
RBC
America/Toronto
------------------------------
Micheal Charron
RBC
Toronto, Ontario
Canada

Hi Michael

Of course I did... rookie mistake... I'm still getting the hang of writing expressions

Thanks very much 🙂

Fran



------------------------------
Fran Woodcock
------------------------------