# Help with an inventory spreadsheet

1. ## Help with an inventory spreadsheet

I'm having difficulty limiting a value for the number of pieces to order.

The formula I'm using to calculate the third column is =+IF(C5=D5>0,C5,"0") The problem I'm having is seen in row 4. The number sold is 7 and the adjustment is -5. I'm not sure how to have the "if true" statement become another IF function. Ideally, I'd like the number to order for row 4 to show as 2 in this case, or 0 if the number sold is fewer that the adjust number.

Matt

Number sold Adjust Number to order

1 -4 0
2 -28 0
0 -13 0
7 -5 7
2 19 2
4 12 4
0 14 0
1 12 1
1 8 1
1 8 1

2. ## Re: Help with an inventory spreadsheet

Hi Big,

First off, your condition (C5=D5>0) is incorrect. This should produce a true or false result. In other words, only one operator.

What you are looking for is a Nested IF statement, but I think the AND formula will work better for you.

=IF(AND(C5=D5,D5>0),C5,0)

Is this correct?

3. ## Re: Help with an inventory spreadsheet

Bigtroutcather,

Welcome to the forum!
I'm not 100% certain, but if I understand correctly, this formula should work for you:
``Please Login or Register  to view this content.``

4. ## Re: Help with an inventory spreadsheet

Then ignore my formula and you should go ahead with a nested IF...

=IF(C5+D5>0,IF(condition,true,false),0)

Note: no need to quote 0s ("0"), unless you want it to apprear as text

re-post: very elegant, tiger... nice work!

5. ## Re: Help with an inventory spreadsheet

djapigo,

You're correct. The = should have been a +. Sorry for the typo.

tigeravatar,

The max formula works great. Never seen it before. I guess I have a little reading to do.

Thank you both for your help!

Matt

6. ## Re: Help with an inventory spreadsheet

You're very welcome

New quick method:

Or you can use this way:
How to mark a thread Solved
Go to the first post
Click edit
Just below the word Title you will see a dropdown with the word No prefix.
Change to Solved
Click Save

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