Forum Discussion
Mgaltieri
Jul 11, 2023Copper Contributor
Excel function
I need to write an excel function that: If column B color is #FFC7CE, then take column C value and copy it to D as many times Column B value is repetead on column A. This is how it should l...
- Jul 11, 2023
Okay, thank you. Perhaps you mean
with formula in E1 as
=IFERROR( INDEX( C:C, MATCH( $A1, B:B, 0 ) ), $C1 )and drag it down.
Mgaltieri
Jul 11, 2023Copper Contributor
Ok, here is the logic Sergei:
If column B1 value is wherever in column A, take C1 value and copy to D column A each row where value is B1.
So, in my example, if B1 is "A", then A is present two times in column A, so I have to pick value from C1 column ("Value A") and paste it in D column each time B1 value is in A column.
So, formula should return VALUE A for column D1, VALUE A for column D2 and VALUE C for column D3
Here is a better example so you don't get confused with Value A and Columns.
Huge thanks!
SergeiBaklan
Jul 11, 2023Diamond Contributor
Okay, thank you. Perhaps you mean
with formula in E1 as
=IFERROR( INDEX( C:C, MATCH( $A1, B:B, 0 ) ), $C1 )
and drag it down.
- SergeiBaklanJul 11, 2023Diamond Contributor
Mgaltieri , you are welcome
- MgaltieriJul 11, 2023Copper ContributorAwesome! Thank you very much Sergei for your help!