# Nesting IF Statements with AND/OR Functions

1. ## Nesting IF Statements with AND/OR Functions

Hello and Greetings to all,

I am a new member here and would like to seek the help to get my formula correct to work on an inventory file:

there are three counts, first count, second count and Third count for the same item. But would like to to get the count as per below:

If second count and third count are Blank or Zero: need to get the figure of first count as the final count.
If there is a value in second count and third count: need to get the figure of second count as the final count
If there is a value in first count and third count: need to get the figure of third count as the final value. I have create a formula as per below and its fine with the first and second count. But its not taking care of the third count and give as false if there is a value in Third count:

=IF(AND(G21="",F21),IF(H21="",F21),IF(G21>=0,G21 or IF(H21>0, H21)))

Appreciate your support on this. Thank you. Thomas Mathew

Hi

3. ## Re: Nestiung IF Statements with AND/OR Functions

Welcome to the forum.

Please take a moment to amend your thread title. Make sure that the title properly explains your request. Your title should be explicit and not be generic (this includes function names used without an indication of what you are trying to achieve).

Please see Forum Rule #1 about proper thread titles and adjust accordingly. To edit the thread title, open the original post to edit and then click on Go Advanced (bottom right) to access the area where you can edit your title.

(Note: this change is not optional. As you are new here, I have done it for you this time.)

4. ## Re: Nestiung IF Statements with AND/OR Functions

Maybe try this:

=IF(AND(G21="",H21=""),F21,IF(G21>=0,G21,IF(H21>0,H21,"")))

5. ## Re: Nestiung IF Statements with AND/OR Functions

=IF(AND(G21="",H21=""),F21,IF(G21="",H21,IF(AND(G21>=0,H21>=0),G21)))

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