named range

orsm6

Active Member
Joined
Oct 3, 2012
Messages
277
Office Version
365
Platform
Windows
Hi, i am trying to define a named range that excludes any blank cells. the named range though is across columns. the range is D11:IS11. I wanted to then use a DV list box to link to the named range.

i have found plenty of examples that will do this in a column, how can i do it in one row across columns?

TIA
 

Some videos you may like

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)

Rick Rothstein

MrExcel MVP
Joined
Apr 18, 2011
Messages
35,800
Office Version
2010
Platform
Windows
If D11:IS11 only contain constants (no formulas)...

Range("D11:IS11").SpecialCells(xlConstants).Name = "NewNameForRange"
 

orsm6

Active Member
Joined
Oct 3, 2012
Messages
277
Office Version
365
Platform
Windows
hi Rick, thanks for your help.

when i paste your formula into a new named range it double quotes some of it.
i run into trouble when trying to create a data validation box called list. i get an error.

="Range(""c11:c11"").SpecialCells(xlConstants).Name = ""list"""

cheers.

also. this range contains names only. each cell has last name, first name over 2 lines...e.g.

last name,
first name
 
Last edited:

orsm6

Active Member
Joined
Oct 3, 2012
Messages
277
Office Version
365
Platform
Windows
my question was possibly misunderstood. i don't want to use a macro.

in cell B11 i want to create a drop down list. just like with a normal data validation list box.
the range though is D11:IS11
how can i get b11 to show all the names in that range, excluding the blank cells
 
Last edited:

Rick Rothstein

MrExcel MVP
Joined
Apr 18, 2011
Messages
35,800
Office Version
2010
Platform
Windows
my question was possibly misunderstood. i don't want to use a macro.

in cell B11 i want to create a drop down list. just like with a normal data validation list box.
the range though is D11:IS11
how can i get b11 to show all the names in that range, excluding the blank cells
I do not believe you can do that (other than with a macro) with the version of Excel I use (XL2010), but perhaps the newer versions have a function (TEXTJOIN maybe) that can be used. You will have to wait for someone with a newer version of Excel to come along and respond.
 

orsm6

Active Member
Joined
Oct 3, 2012
Messages
277
Office Version
365
Platform
Windows
i appreciate your help. i will see if i can get your idea working in the meantime using VBA.

ta
 

orsm6

Active Member
Joined
Oct 3, 2012
Messages
277
Office Version
365
Platform
Windows
I have found a way to do it.

i created a named range called LIST: =SOP!$D$11:INDEX(SOP!$D11:$IS11,COUNTA(SOP!$D11:$IS11))
i then created a data validation list box using =LIST
i now have a list of names in B11 that are contained in range D11:IS11 and it excludes blank cells
 

Watch MrExcel Video

Forum statistics

Threads
1,095,204
Messages
5,443,013
Members
405,212
Latest member
Arnie58

This Week's Hot Topics

  • Copy entire row if CountA <>0 to another sheet
    [B]I want to copy entire row if CountA <>0 for column J7:AM7 (headers on J6:AM6) and so on till the last used cell is column D and paste the...
  • Select last used Row in Table
    I have created a Table in a Worksheet which is locked to prevent user errors and protect formula. Some of the cells require freetext entries which...
  • excel workbook: do not allow certain file name
    Hello all, Don't think this has ever been asked before, but how do I restrict file save [Before_Save Event] if the name of the file being saved...
  • fixing problem autofilter
    hello i need help about my code when i search by code in textbox it doesn't show anything this is my data [ATTACH type="full"...
  • “Weight”
    Hi, i’ve got a long sheet filled with weights such as kg,g,L & ml. i can build a formula to convert kg into g and liter into ml. How ever, my...
  • How to capitalize everything before a certain character?
    In column A, I have some text: Hello good day.mp3 Hello good day.flac etc. I'd like to capitalize everything before the period. I don't need the...
Top