How to Drag Excel formula to the remaining rows when the range is unknown

Hi All,

How to drag the formula to all the rows in a particular column? I am performing Vloop up based on other sheet and the range keeps changing constantly

1 Like

Fine
–initially get the datatable from excel with read range activity and get the output with a variable of type datatable named dt, within excel application scope
–now use FOR EACH ROW loop and pass the variable dt as input
–insde the scope use WRITE CELL activity and mention the formula we have as input string between double quotes…and in the range mention as if its C column we are going to use the formula then the range be like
"C"+(dt.Rows.IndexOf(row)+2).ToString
–so that it will use this formula till the row end everytime even though we dont the row count

hope this would help you
Cheers @Pkotla

Thank you for your response. But I see the same ID getting replaced in all the rows. Here is the formula I am using in the first row along with the screenshot.

image

formula : =VLOOKUP(D2,’[exceldocument.xlsx]sheet1’!$1:$1048576,3,FALSE)

@Palaniyappan , please let me know if I am doing something wrong.