Print: "In-Stock", or "No-Stock", IF Multiple Conditions Are Met

BrandonBerner

New Member
Joined
Mar 16, 2019
Messages
15
I'm back, with another headache haha.

I have 2 Sheets.

Sheet 1 - Is user-friendly
Sheet 2 - Is a database full of product information.


Sheet 1 currently looks like...

AB
1[In Stock?][Product Name]
2?Product #3
3?Product #2
4?Product #4
5?Product #1

<tbody>
</tbody>

Sheet 1 should look like...

AB
1[In Stock?][Product Name]
2No StockProduct #3
3In StockProduct #2
4In StockProduct #4
5No StockProduct #1

<tbody>
</tbody>


Here are 2 NON-WORKING formula to explain what I'm trying to achieve...

HTML:
IF B2=Sheet2!B2:B & If Sheet2!A2>=1, "In Stock", "No Stock"

HTML:
=COUNTIFS((B2,Sheet2!B2:B),MATCH(Sheet2!A2>=1), "In Stock", "No Stock")


Sheet 2 looks like...

AB
1[Inventory Count][Product Name]
20Product #1
320Product #2
40Product #3
540Product #4

<tbody>
</tbody>
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Try this;

=IF(SUMIF(Sheet2!$B$2:$B$5,Sheet1!B2,Sheet2!$A$2:$A$5)>0,"In Stock","No Stock")
 
Upvote 0
Well....it WAS working... for my exact example above, but does not want to work for my actual workbook. -_-
...The headache starts again lol

I updated your formula according to this exact layout, and it wont work anymore.

Your Formula based on my previous example:
HTML:
=IF(SUMIF(Sheet2!$B$2:$B$5,Sheet1!B2,Sheet2!$A$2:$A$5)>0,"In Stock","No Stock")
Updated Formula based on my actual worksheet:
Code:
[COLOR=#574123]=IF(SUMIF(Sheet2!$C$3:$C$11,Sheet1!C3,Sheet2!$B$3:$B$11)>0,"In Stock","No Stock")[/COLOR]


<style type="text/css"><!--td {border: 1px solid #ccc;}br {mso-data-placement:same-cell;}--></style>
Product Request (Sheet #1)
STATUSNot ImportantProduct NameSKUNot Important
?Product #11
?Product #22
?Product #44
?Product #66
?Product #99

<tbody>
</tbody>


<style type="text/css"><!--td {border: 1px solid #ccc;}br {mso-data-placement:same-cell;}--></style>
Inventory (Sheet #2)
SKUQuantityName
10Product #1
2200Product #2
30Product #3
4400Product #4
50Product #5
6600Product #6
70Product #7
8800Product #8
90Product #9

<colgroup><col style="width: 71px"><col width="67"><col width="205"></colgroup><tbody>
</tbody>

On sheet 2, each cell is pulling information from a 3rd sheet. Would this be causing it not to work?
For example: On sheet 2, A3 has the formula... =Sheet3!$C1<style type="text/css"><!--td {border: 1px solid #ccc;}br {mso-data-placement:same-cell;}--></style>
 
Upvote 0
It shouldn't matter what you reference from Sheet3 as long as Product #1 (Sheet3) is exactly the same as Product #1 Sheet1 with no trailing spaces.

It would be maybe more robust to use a formula to extract your SKU with Vlookup or Index & Match so you don't end up with #N/A or #Ref ? errors.

What error are you getting? If unsure if you can make a small sample of your workbook with the same structure I can look at it for you.
 
Upvote 0

Forum statistics

Threads
1,213,482
Messages
6,113,916
Members
448,533
Latest member
thietbibeboiwasaco

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top