Hi UiForum! Appreciate if you could assist me in this
Brief Breakdown of My Current Workflow:
i) Firstly, I will read my Outlook inbox and read information from desired emails and extract data i.e. Date, Amount etc into Worksheet A using Write Range Workbook Activity. (I have alr achieved this)
ii) Now that i have these figures in Worksheet A, i would like to copy and paste data from Worksheet A to Worksheet B based on date (see figure below). Though they are similar, the difference between worksheet A and worksheet B is that worksheet B has all the dates of the month listed down in its “Date” column i.e. 1-Nov-19 to 31-Nov-19, whereas Worksheet A would have a list of dates up till the latest date of when date info is extracted from Outlook as mentioned earlier, in this case, “5-Nov-19” which is also stored as a variable “DateA”.
iii) What i have done so far, is to use Excel Application Scope and Read Range for Worksheet A & B and create a Datatable for both. How can i now copy the data from the “5-Nov-19” row in Worksheet A to the same date value row in Worksheet B? Meaning if Worksheet A & B both contains “Date A” in this case “5-Nov-19”, then extract figures from “Date A” row in Worksheet A to “Date A” row in Worksheet B.
I am now stuck at writing an expression for the For each row activity. I have loaded both Worksheet A & B into 2 datatables respectively i.e. DT1 & DT2. Using the If condition, i would like to set my condition as “If DT1 contains (DateA); DateA being the variable that stores the row name, and that DT 2 also contains (DateA), then extract data from DateA row in DT1 into DateA row in DT 2”.
i have tried “rowA.item(DateA)=rowB.item(DateA)” but the error message is still present.