Named range question

hallingh

Well-known Member
Joined
Sep 11, 2010
Messages
769
Pretty simple question: Is there a way to make a named range ignore blank values? So if I had a named range defined as A1:A125, but A25:A50 were blank, it would just display A1:A24 and A51:A125?

THanks for the help.

Hank
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Yes. but it wouldn't be dynamic:

Code:
Range("A1:A125").SpecialCells(xlCellTypeConstants).Name = "Bob"
 
Upvote 0
Hmmm I was hoping to not use vba for this one. I have a range that only has a certain amount of values but some of them are currently blank. I did it this way so other people can simply copy and paste data into the range and the documents will still work. I don't want the blank documents to show, though, because I'm displaying the values of the named range in a combo box, and currently there are a bunch of blank values being displayed. I figured there would be a simple way using native excel to either have the named range ignore blank values or have the combo box ignore blank values, but I can't seem to figure out how to do either.

Is there any hope for what I'm trying to do?

Thanks for the response.

Hank
 
Upvote 0
Select A1:A125, Ctrl+G, Special Cells, Constants. Then you can give the range a name in the Names box, or copy it to someplace else.
 
Upvote 0

Forum statistics

Threads
1,224,574
Messages
6,179,626
Members
452,933
Latest member
patv

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