Paddi
1
Hi all,
I’m trying to copy a column and paste + transpose at the same time, when the source is:
Excel.Sheet(“Sheet2”).Range(“A:A”),
error would occur, so I tried a range here:
Excel.Sheet(“Sheet2”).Range(“A1:A76”)
The problem is the ‘76’ in this expression would change every time, so I would like to use a variable to replace it.
Wondering how should the variable be inserted in the expression below:
Excel.Sheet(“Sheet2”).Range(“A1:Avariable”)
Thank you~
Anil_G
(Anil Gorthi)
3
@Paddi
Please try this
Excel.Sheet("Sheet2").Range("A1:A" + Variabletoabeinserted)
Cheers
1 Like
Sharath_HK
(Sharath Keshavamurthy)
4
you can try as mentioned the below
here rowCounter is an integer value which holds the row value of the last row.
1 Like
Paddi
5
Hi @Sharath_HK ,
Can we use an activity in Studio to get the rowCounter? Cause when I tried to use in directly, it shows the variable is not declared. Thank you.
You could use the “Find First/Last Data Row” activity to get the last row in a column.
1 Like
Paddi
7
Hi @Anil_G ,
Thank you, it’s working with some followup adjustments.
1 Like
Paddi
8
Hi @yikwen.goo ,
Thank you for your answer, it’s working!
system
(system)
Closed
10
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.