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 look like:
Thanks!
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.
10 Replies
Sort By
In Excel functions don't work with cell properties like color, only with values. That's only with VBA if you consider such option.
- MgaltieriCopper ContributorI am trying something like this but having a SPILL error that doesn't let me know which are the obstructing cells.
=IF($D2=C:C,$E2, "")Such formula returns entire column, i.e. 1 048 576 values. Thus it's not enough space to place the result, thus #SPILL error.
You may use something like
=IF( COUNTIF(C:C, D2) - 1, E2, "" )
- MgaltieriCopper ContributorOk, thanks. Do you know if I can use another formula to check only for the repetead values?