Find difference between 2 cells if critera in a 3rd cell is met

E

Eric E

How would I find the difference between two cells depending on what is in a
third cell? For example, in column G1 I want to show the difference E1 and
whichever cell in column F contains the number 1. I was thinking something
along the lines of using SUMPRODUCT to find the row with the #1 and then
somehow subtracting G1 from the number column E that match the row where the
number 1 was found.
 
T

T. Valko

This is VERY confusing! At least, to me it is.

There's probably a simple solution but I don't understand.

You want the formula in cell G1?

This is the really confusing part:
I want to show the difference E1 and whichever
cell in column F contains the number 1.

The literal interpretation of that is to simply subtract 1 from E1 but I'm
sure that's not what you want.
 
P

Pete_UK

So, if you have a 1 in F6, for example, you want E1-E6 in G1?

If so, try this:

=E1-INDEX(E$2:E$100,MATCH(1,F$2:F$100,0))

Hope this helps.

Pete
 
E

Eric E

Pete_UK, Yes that is it. Thank you very much for your assistance. Sorry for
not being clearer in my original post.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top