Formula to search for data

gemmavine

New Member
Joined
Oct 28, 2010
Messages
47
Hi all,

I have a spreadsheet and in one of the columns i have to put if an item is in stock or not and i have to calculate the ones not in stock.

The majority are in stock, and say 'in stock' however, some are out of stock. usually i just manually look up and down the column and count how many 'out of stocks' i can find.
Can someone tell me a formula which will calculate automatically how many there are?

Also, i have to add rows onto the bottom of this when i get orders. How do i make sure excel still calculates all of the 'out of stocks' above, will it auto do this or will i have to change cell references to include all data?

Hope this makes sense.

Regards

Gemma
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Use the COUNTIF function. (=COUNTIF(C1:C11,"in stock"))
Assuming the column you were calculating is in column C, this forumla would return the number of items In stock.
 
Upvote 0
Hi,

Thanks for your reply however, when using this excel says my formula contains an error.

Regards

Gemma
 
Upvote 0
The formula cannot go in column A or you'll get a circular reference

Excel Workbook
AB
1out of stock3
2in stock
3out of stock
4out of stock
Sheet2
 
Upvote 0
Hi,

Thanks for your reply however, when using this excel says my formula contains an error.

Regards

Gemma


As given above in VoG's post

=COUNTIF(A:A,"out of stock")

This will work - just amend the "A:A" to match the range you are looking to count.

:)
 
Upvote 0

Forum statistics

Threads
1,224,600
Messages
6,179,834
Members
452,947
Latest member
Gerry_F

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