# IF multiple cells = then -1

1. ## IF multiple cells = then -1

Hi

I'm looking for a little help please. I'm in the throws of putting a basic sheet together and would like to be pointed in the right direction.

excel.jpg

What I am trying to do is use the IF function to check cell B4 to see if "y" has been entered and if so, check the value in cell F4 (a hidden "14"), then subtract "-1" from that figure and return the result in the formula's cell of F10. A countdown if you like.

This is the formula I used:
``Please Login or Register  to view this content.``
This works great, however I want to be able to check multiple cells for "y" and reduce the result by 1 for each instance. This I cannot work out and I'm sure i'm going able it in the wrong way, I have tried the following. But that results in to many arguments error:
``Please Login or Register  to view this content.``
Thank you for any help given. I have attached a picture, hopefully that will show.

2. ## Re: IF multiple cells = then -1

you can try something like this

=F4-countif(B4:B16,"Y")

tell me if this works for you.

3. ## Re: IF multiple cells = then -1

Your formula works great, however is there a was to include the opporsite cell range of H4:H16?

4. ## Re: IF multiple cells = then -1

create two countif then get sum like this
=F4-(COUNTIF(B4:B16,"Y")+COUNTIF(H4:H16,"Y"))
or
=F4-sum(COUNTIF(B4:B16,"Y"),COUNTIF(H4:H16,"Y"))

or refer the range until H column

=F4-COUNTIF(B4:H16,"Y")

5. ## Re: IF multiple cells = then -1

I was just a minute behind you vlady, I found this works perfectly:

``Please Login or Register  to view this content.``

6. ## Re: IF multiple cells = then -1

Nice to hear that and your welcome.
You can mark this thread solved..

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1