Forum Discussion

Mgaltieri's avatar
Mgaltieri
Copper Contributor
Jul 11, 2023
Solved

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!

10 Replies

  • Mgaltieri 

    In Excel functions don't work with cell properties like color, only with values. That's only with VBA if you consider such option.

    • Mgaltieri's avatar
      Mgaltieri
      Copper Contributor
      I 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, "")
      • SergeiBaklan's avatar
        SergeiBaklan
        MVP

        Mgaltieri 

        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, "" )
    • Mgaltieri's avatar
      Mgaltieri
      Copper Contributor
      Ok, thanks. Do you know if I can use another formula to check only for the repetead values?

Resources