How to paste in specific cell where a column contains a variable value

What I am trying to accomplish is to paste a value (saved in a variable) into a specific column. Below is a small example of the spreadsheet I am trying to paste into.

Bank/Calendar Date CA CO GA IN
Plan Code Plan Code 040 Plan Code 051 Plan Code 102 Plan Code 131
Bus Unit G0360 Bus Unit G1525 Bus Unit G0385 Bus Unit G2001
02/03/19 - -
02/06/19 - -

I can figure the date (row), however the column is tricky as I wanted to do an IF statement where if column contains (for example 040 for CA) than it would paste in that column. So for an example if my variable stored amount was 100 and the date was 2/3/19, and it was for plan code 051, then the 100 would be posted in cell C10.

Sorry if this makes no sense, but I would be indebted forever for any ideas.


You can achieve this by using data table filters, in for each row have one index variable and keep increment/decrement based on the conditions, at the end once all your other conditions met you will be having row index then you can use write cell with column name along with variable in cell value and write the value to specific cell…

Any chance you could show what that code/structure in UiPath would look like?