Write cell based on column and row names

Hello,

I have a process where I have multiple Excel tabs which I have named to match a variable.

forum

I then have to write another variable into the current date for the appropriate client number. Is it possible to have the process identify the correct column (tied to client number variable) and row (today’s date) instead of passing a specific cell (ie. A1)?

forum2

Yah thats possible
with row index and column index we can mention the cell position
where we need to first get the datatable and pass that datatble variable as input to FOR EACH ROW loop and inside that loop we need to use a WHILE loop with condition like this
counter < dt.Columns.Count
and increment that counter value with a assign activity like this
counter = counter + 1

inside this while loop we can use WRITE CELL activity with cell mention with this range
Convert.ToChar(65+counter).ToString+(datatable.Rows.IndexOf(row)+2).ToString

Cheers @rgardner5564

Thank you for your reply @Palaniyappan . Please forgive my ignorance but I’m not sure how the solution you provided works. Does your solution involve counting the number of columns to determine which one is correct? I have 12 tabs in total and some have 3 columns with client names and others have only 1. That’s why, ideally, I wanted to find the client number as a column header since I’ve already passed that value as a variable and it changes as it iterates through a loop I created. So, in my screenshot above, it would first find 148830 and and then the row with today’s date. Next, it would find 150475 and today’s date, and so on.

@vickydas any thoughts on this one? Your solution on my other question was super helpful.

I have an account balance that I save as a variable from a website and I need to type that amount into the column with the client number and the row with today’s date. I don’t know how to use the write cell activity to accomplish this since it references a static cell and my cell changes each day and by client.

Thank you!

Invested Cash.xlsx (31.4 KB)

Hello @rgardner5564

Can you please explain a bit more about this scenario…what kind of values do you get and do you get both client number and account balance together ??

So From my understanding
You have to add a row containing all the data (ie Account Balance) in too the column of the respective client number…How do we know if its the number of that particular client number ?

For this i have created a sample workflow using For each row and Assign activity
Check it and understand it …

Rgardner_Account.xaml (11.2 KB)

Thank you @vickydas. At the beginning of the process I read an Excel file and, using a For Each Row activity, create a variable of the client number. So ideally I could use that variable to assign the proper column.

I think I understand the rest of the information you sent over. I’m going to combine it with my current process to test this morning.