Create grocery list without any blanks

coccio

Board Regular
Joined
Mar 19, 2002
Messages
156
Office Version
  1. 2016
2021-12-29_203420.png


I am trying to create a list in column C without any blanks

I select a food in column B mark it with a x and it highlights the food which it does and then I want it listed in Column C without any blanks cells between the foods as in this case I would like to see it listed in column C as
C2 = Avocados
C3 = Cucumbers
C3 = Zucchini
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
If your version of Excel includes the FILTER function try:
Book1
ABC
1FoodGroceryList
2AvocadosxAvocados
3LemonsCucumbers
4ApplesZucchini
5Cucumbersx
6Carrot
7Celery
8Zucchinix
Sheet1
Cell Formulas
RangeFormula
C2:C4C2=FILTER(A2:A8,B2:B8="x","")
Dynamic array formulas.
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A2:A8Expression=$B2="x"textNO
 
Upvote 0
Filter function doesn't work in my version of excel
OK. If you have Excel 2010 or later maybe:
Book1
ABC
1FoodGroceryList
2AvocadosxAvocados
3LemonsCucumbers
4ApplesZucchini
5Cucumbersx 
6Carrot 
7Celery 
8Zucchinix 
Sheet1
Cell Formulas
RangeFormula
C2:C8C2=IFERROR(INDEX($A$2:$A$8,AGGREGATE(15,6,(ROW($A$2:$A$8)-ROW($A$2)+1)/($B$2:$B$8="x"),ROWS(A$2:A2))),"")
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A2:A8Expression=$B2="x"textNO
 
Upvote 0
Solution
I have 2016 and I was trying to get the iferror working for me and you got it solved thank you
 
Upvote 0
I have 2016
Please add that information to your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0

Forum statistics

Threads
1,214,932
Messages
6,122,331
Members
449,077
Latest member
jmsotelo

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