Dont' display rows based on certain columns being empty?

JazzSP8

Well-known Member
Joined
Sep 30, 2005
Messages
1,233
Office Version
  1. 365
Platform
  1. Windows
Hey All

I've built a Query that pulls in details about certain products in our range.

The problem I've got is that the details for each product live in a text file, it contains details for every product we've ever stocked including some obsolete ones.

Because of this my Query is returning lots of blank rows when there is no SKU associated any more.

The SKUs end up in one of 6 columns at the end of the data.

I thought I'd be able to hide them by using another column to see if they're blank or not and the using a criteria filter.

Code:
Good: IIf(IsNull([Level 0 Live SKU]) And IsNull([Level 1 Live SKU]) And IsNull([Level 2 Live SKU]) And IsNull([Level 3 Live SKU]) And IsNull([Level 4 Live SKU]) And IsNull([Level 5 Live SKU]),"N","Y")

The formula works if I just run the query and the new column populates correctly but when I include the <>"N" criteria I get a "Enter Parameter Value" pop up message box for each of the Level (x) Live SKU fields.

Can I not do it this way? Or am I doing something wrong?

Thanks in advance for any help that can be provided :)
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Your criteria should be in the Criteria row (or WHERE clause if writing the SQL).

The SQL would be:
Code:
 WHERE Nz([SKU],'') <> ''

The criteria should be able to go under any of the columns in the Criteria row and will look like the SQL minus the WHERE, so:
Code:
 Nz([SKU],'') <> ''
 
Upvote 0
Hi Jon, thanks for response.

"Your criteria should be in the Criteria row" is what I needed :)

I added "Is Not Null" to each column Criteria / Or and that worked.

Thanks for that.
 
Upvote 0

Forum statistics

Threads
1,224,816
Messages
6,181,141
Members
453,021
Latest member
Justyna P

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