Hey everyone! I’m working on a Google Sheets assignment and could use some help. The task is to figure out what portion of our products are no longer being made. I need to write a formula in Google Sheets to show this.
I started by counting the zeros in the ‘discontinued’ column using =Countif(J2:J78,‘0’). But I’m not sure if that’s right or how to turn it into a ratio.
Can someone check if I’m on the right track? And maybe explain how to show it as a proportion? I’m a bit lost here.
Thanks a bunch for any tips!
I’ve dealt with similar inventory analysis tasks before, and your approach is a good starting point. To get the ratio of discontinued products, you’ll want to compare the count of discontinued items to the total number of products. Here’s a formula that should work:
=COUNTIF(J2:J78, 0) / COUNTA(J2:J78)
This will give you a decimal result. You can format the cell as a percentage for easier interpretation. One thing to keep in mind: make sure your ‘discontinued’ column uses consistent values (0 for discontinued, 1 for active, for example). If there are any blank cells or inconsistent data, you might need to adjust the formula.
Also, consider adding a label to clearly indicate what this ratio represents in your spreadsheet. It’ll make your work more comprehensible for others who might review it.
hey skippin leaf, ur on da right track! u got the discontinued count, now just divide that by total products. so like =COUNTIF(J2:J78,‘0’)/COUNTA(J2:J78) should do it. make sure to format as % in sheet for ez readin. GL with ur assignment!
Your approach is sound, but let’s refine it for accuracy. Instead of counting zeros, consider counting non-zero values to represent discontinued items. The formula would be:
=COUNTIF(J2:J78, “<>0”)/COUNTA(J2:J78)
This assumes non-zero values indicate discontinued products. Adjust the condition inside COUNTIF if your data uses a different convention. Remember to format the result as a percentage in the sheet settings.
For robustness, you might want to exclude any potential blank cells:
=COUNTIF(J2:J78, “<>0”)/COUNTIF(J2:J78, “<>”)
This ensures only filled cells are considered in the ratio calculation.