Hi,
I have 2 tables named FDT_Previous and FDT_1. I want to retreive the hours in column FDT_1 [8/18/24] the hours from column FDT_Previous [8/18/24] where "employee number" "task code" are the same.
The formula in my column FDT_1 [8/18/24] is working perfectly :
=IFERROR(INDEX(FDT_Previous[8/18/24], MATCH(1, (FDT_Previous[employee number] = [@[employee number]]) * (FDT_Previous[task code] = [@[task code]]), 0)), "")
When I'm doing this code in the VBA :
ActiveCell.FormulaR1C1 = "=IFERROR(INDEX(FDT_previous[" & Prev_dimanche & "], MATCH(1, (FDT_previous[employee number] = [@[employee number]]) * (FDT_previous[task code] = [@[task code]]), 0)), """")"
The result is :
=IFERROR(INDEX(FDT_Previous[8/18/24], MATCH(1, (FDT_Previous[@[employee number]] = [@[employee number]]) * (FDT_Previous[@[task code]] = [@[task code]]), 0)), "")
That's mean the formula is incorrect. It change my reference column into cell reference and it's not appropriate.
I tried multiple approaches with the same failed result.
How can I resolve this ?
Thanks
I have 2 tables named FDT_Previous and FDT_1. I want to retreive the hours in column FDT_1 [8/18/24] the hours from column FDT_Previous [8/18/24] where "employee number" "task code" are the same.
The formula in my column FDT_1 [8/18/24] is working perfectly :
=IFERROR(INDEX(FDT_Previous[8/18/24], MATCH(1, (FDT_Previous[employee number] = [@[employee number]]) * (FDT_Previous[task code] = [@[task code]]), 0)), "")
When I'm doing this code in the VBA :
ActiveCell.FormulaR1C1 = "=IFERROR(INDEX(FDT_previous[" & Prev_dimanche & "], MATCH(1, (FDT_previous[employee number] = [@[employee number]]) * (FDT_previous[task code] = [@[task code]]), 0)), """")"
The result is :
=IFERROR(INDEX(FDT_Previous[8/18/24], MATCH(1, (FDT_Previous[@[employee number]] = [@[employee number]]) * (FDT_Previous[@[task code]] = [@[task code]]), 0)), "")
That's mean the formula is incorrect. It change my reference column into cell reference and it's not appropriate.
I tried multiple approaches with the same failed result.
How can I resolve this ?
Thanks