Referring to blank cells in a field

RhondaStockton

Board Regular
Joined
Nov 14, 2003
Messages
72
Hi there
I have a report with totals per a specific category. But not all the information is in the table, so there are a few blank cells.
I need to replace these blank cells with "Not Specified" in the report. I was thinking to use an Iif statement, but I'm not sure how to refer to a blank cell (if the cell is blank, "Not specified", [category])
Please could you advise?
Thank you
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
This can be tricky. Access provides 2 functions -- IsNull and IsBlank (or IsEmpty -- one of these is Access, the other Excel)
I've found that referring to either of them can be a pain. You often don't get what you want.
I'd suggest this:
Build a query with just the field that you want to populate. Try using IsNull or the other options in the Criteria field. See (in datasheet view) if you get what you need.
If so, change the query to an Update query (select the Query menu in Design view). In the Update To row that appears, enter "Not Specified" or whatever text you want -- this is a TEXT field, right?

Click the Run icon (the exclamation mark) and you'll get a warning about changing records. Click OK. Save teh query as FillBlanks (or some other useful name).
Next time you run the report, run this query first.

Denis
 
Upvote 0
You might try using LEN instead.
Test the field contents for length >0

Depending on field format you may generate an error code which you will have to handle.

Mike
 
Upvote 0

Forum statistics

Threads
1,221,672
Messages
6,161,199
Members
451,688
Latest member
Gregs44132

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