Home > Net >  MS excel formula to extract values from text
MS excel formula to extract values from text

Time:05-17

please advice how to sum values by condition.

I have a row of cells with text values: 1x, 2y, 5x, 7y, 9y, 2x, 6x.

How to get the sum of Xs or Ys?

CodePudding user response:

You may try-

=SUM(IFERROR(--SUBSTITUTE($A$1:$G$1,C6,""),0))

You may need array entry for older version of excel. Array entry means enter formula by CTRL SHIFT ENTER.

enter image description here

  • Related