Almost correct.. needs one tweak

BPS4690

New Member
Joined
Apr 26, 2018
Messages
4
Hello... Ive spent a couple of days perusing this wonderful forum and found a great solution to my problem, but there's just one thing preventing it from functioning properly... the old "blank cell that isn't truly blank" conundrum.

Here's what Im trying to do. (from actual workbook)
I want to populate a list only of items which have a value after them. If no value, then do not display.
Easy enough for static data.. but this is not my case.



COLUMN COLUMN
AM AO
Hibachi Salad0.625
Balsamic Vinaigrette
BBQ
Buffalo-Garlic0.125
Sauce, cashew cream base0.125
Cashew Cremoso0.125

<tbody>
</tbody>

Where both columns AM and AO are referencing other parts of the same sheet. These are not static values, rather, they are linked to a menu elsewhere... hence when column AO does not show a value, it still contains a formula, which renders my potential solution worthless.

Im using the following array formula to only display rows where AO does not equal "".

In column AM... =IFERROR(INDEX(AI$49:AI$<wbr>81,SMALL(IF(AJ$49:AJ$81<>"",<wbr>ROW(AI$49:AI$81)-ROW(AI$49)+1)<wbr>,ROWS(AI$49:AI49))),"")

In column AO... =IFERROR(INDEX(AJ$49:AJ$<wbr>81,SMALL(IF(AJ$49:AJ$81<>"",<wbr>ROW(AI$49:AI$81)-ROW(AI$49)+1)<wbr>,ROWS(AI$49:AI49))),"")

WHen I test it against cells with static data, it works great and the blank cells cause both the item and the number to not appear at all in the list (as is the goal).. but when i try it in my recipe list, which is linked, the blank cells are not seen as ""...

How can I edit the above formula to account for this?

Thank you to anyone who can help.
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Welcome to the board.

Try changing
AJ$49:AJ$81<>""
to
LEN(AJ$49:AJ$81)>0
 
Last edited:
Upvote 0
Thanks for the reply, Jonmo1

As such?

=IFERROR(INDEX(AI$49:AI$81,SMALL(IF(LEN(AJ$49:AJ$81)>0,ROW(AI$49:AI$81)-ROW(AI$49)+1),ROWS(AI$49:AI49))),"")

=IFERROR(INDEX(AJ$49:AJ$81,SMALL(IF(LEN(AJ$49:AJ$81)>0,ROW(AI$49:AI$81)-ROW(AI$49)+1),ROWS(AI$49:AI49))),"")

This did not cause the cells with "0" or "" to go away.. I did remember to "ctrl, shift, enter" for the array..
hmmm..
 
Upvote 0
In column AP

=IF(AO1=">0",AO1,"")

Drag all the way down to bottom. Filter Column AP to not show blanks.
 
Last edited:
Upvote 0
Thanks for the reply, Robbie19.. but alas, this is not a solution.. I need the item name as well as the quantity to only appear if there is a value. The blank cells are not truly blank because they have a formula in them. (see original post)

Hibachi Salad0.625
Balsamic Vinaigrette
BBQ
Buffalo-Garlic0.125
Sauce, cashew cream base0.125
Cashew Cremoso0.125
Caesar Dressing
Cranberry Vinaigrette

<colgroup><col width="72" span="4" style="width: 54pt;"></colgroup><tbody>
</tbody>
 
Upvote 0
@ BPS4690

Row\Col
A​
B​
C​
1​
Hibachi Salad
0.625
2​
Balsamic Vinaigrette
3​
BBQ
4​
Buffalo-Garlic
0.125
5​
Sauce, cashew cream base
0.125
6​
Cashew Cremoso
0.125
7​
Caesar Dressing
8​
Cranberry Vinaigrette

These appear to be your data, where cells of A:B are merged. If so, what is the expected output for this data?
 
Last edited:
Upvote 0
You could use a Pivot Table and filter the Values (which includes output from formulas and errors) greater than 0. This would give you your variable list. Maybe I am just not understanding all the way.
 
Last edited:
Upvote 0
Thanks for the reply, Robbie19.. but alas, this is not a solution.. I need the item name as well as the quantity to only appear if there is a value. The blank cells are not truly blank because they have a formula in them. (see original post)

By filtering to "not show blanks" in column AP as per my formula above, this would show the following;

Hibachi Salad 0.625
Buffalo-Garlic 0.125
Sauce, cashew cream base 0.125
Cashew Cremoso 0.125

The reported blanks from my IF statement would count as "NULL" or blank cells and thus be able to be filtered. You could also filter column AO and remove formula errors. This should give you the same response.
 
Upvote 0
Item Qt
Hibachi Salad0.63
Balsamic Vinaigrette
BBQ
Buffalo-Garlic0.13
Sauce, cashew cream base0.13
Cashew Cremoso0.13
Caesar Dressing
Cranberry Vinaigrette

<colgroup><col><col></colgroup><tbody>
</tbody>


@aladin I cleaned up the sheet and removed the column in between the item and quantity as it was only there to not cut off the text in column A

So now the "item" and "qt" columns are right next to each other... here's what I need to see ...

Hibachi Salad 0.625
Buffalo-Garlic 0.125
Sauce, cashew cream base 0.125
Cashew Cremoso 0.125

Where all items that have 0 as the quantity disappear.. Robby seems to have crqcked the code but when I try it on my end it won't fire.. I'm sure do to some error Im making, but still.
 
Upvote 0
Sheet1 (input)

Row\Col
A​
B​
1​
ItemQt
2​
Hibachi Salad
0.63
3​
Balsamic Vinaigrette
4​
BBQ
5​
Buffalo-Garlic
0.13
6​
Sauce, cashew cream base
0.13
7​
Cashew Cremoso
0.13
8​
Caesar Dressing
9​
Cranberry Vinaigrette

Sheet2 (output)

Row\Col
A​
B​
1​
4​
2​
itemqty
3​
Hibachi Salad
0.63​
4​
Buffalo-Garlic
0.13​
5​
Sauce, cashew cream base
0.13​
6​
Cashew Cremoso
0.13​
7​

In A1 of Sheet2 control+shift+enter, not just enter:

=SUM(IF(LEN(Sheet1!$B$2:$B$9),IF(ISNUMBER(Sheet1!B2:B9+0),1)))

In A3 control+shift+enter, not just enter, and copy down:

=IF(ROWS($A$3:A3)>$A$1,"",INDEX(Sheet1!$A$2:$A$9,SMALL(IF(LEN(Sheet1!$B$2:$B$9),IF(ISNUMBER(Sheet1!$B$2:$B$9),ROW(Sheet1!$A$2:$A$9)-ROW(Sheet1!$A$2)+1)),ROWS($A$3:A3))))

In B3 just enter and copy down:

=IF($A3="","",VLOOKUP($A3,Sheet1!$A:$B,2,0))

If the source contains repeating items, run the following formula in B3 instead:

=IF($A3="","",INDEX(Sheet1!$B$2:$B$10,SMALL(IF(Sheet1!$A$2:$A$10=$A3,ROW(Sheet1!$A$2:$A$10)-ROW(Sheet1!$A$2)+1),COUNTIFS($A$3:A3,A3))))
 
Upvote 0

Forum statistics

Threads
1,215,453
Messages
6,124,930
Members
449,195
Latest member
Stevenciu

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