Help with Excel. Formulas or Conditional Formatting. Unsure?

Help with Excel. Formulas or Conditional Formatting. Unsure?

Author
Discussion

TREMAiNE

Original Poster:

3,991 posts

155 months

Tuesday 27th September 2022
quotequote all
Hi All

I am trying to get Excel to Sum something for me.

Currently, I have conditional formatting set up so that if the information is identical in the "Moved From" and "Moved To" columns, the cells to the right of that grey out. This way, whenever the "Moved From" and "Moved To" columns are different, the cells to the right are white. I've got that working perfectly...



Following on from this, I want to add another column to count this, too.

For example, if the text in "Moved From" and "Moved To" is different for a particular row, I want it to sum as "1". If the text is identical, I want it to sum as "0".

How do I do this?

Edited by TREMAiNE on Tuesday 27th September 12:53

Captain Raymond Holt

12,241 posts

200 months

Tuesday 27th September 2022
quotequote all
Someone will probably come up with something more elegant but won’t:



=(IF(MovedFrom=MovedTo,0,1) work

MovedFrom/To will be the cell refs. You might need to put the 0 and 1 in “”, cant remember!


ETA: do you mean different row or column?

I’m assuming you mean in the same row? Like this:


Edited by Captain Raymond Holt on Tuesday 27th September 13:25

TREMAiNE

Original Poster:

3,991 posts

155 months

Tuesday 27th September 2022
quotequote all
Captain Raymond Holt said:
Someone will probably come up with something more elegant but won’t:



=(IF(MovedFrom=MovedTo,0,1) work

MovedFrom/To will be the cell refs. You might need to put the 0 and 1 in “”, cant remember!


ETA: do you mean different row or column?

I’m assuming you mean in the same row? Like this:


Edited by Captain Raymond Holt on Tuesday 27th September 13:25
Yes, just like that, thank you. smile