Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 27
Default How to Delete blanks between a range and populate only the names inthe given range

Hi All,

I need to know a way where I can key in a data validation in cell.

I have a range A1: A45

I have names in it but with blanks in between them

I cannot delete the blanks as it is a business requirement. But the
validation which I have added to a group of cells which on click of
drop down should only get the names from A1:A45 and not display the
blanks in between as it looks awkward.

Questions:

Can this be done with the help of a single excel function
or there is any other way to do this via code.

Kind Regards,

Yuvraj
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default How to Delete blanks between a range and populate only the names i

I don't deal much with VBA so I'll try to help you by guiding you through
various simple but logical steps, the way I would do it myself.

1. I would copy the names from cells A1 to A45 into a helper column way into
the right, say column Z, or somewhere closer if you don't mind this new
column being seen.

2. Having copied the names into cells Z1 to Z45, and while that range is
still selected, I would sort this range A to Z. This would bring all the
names up to cells Z1 to Z23.

3. I would then select cells Z1 to Z23 and assign a name to it, say "List"
and save the workbook.

4. Then where the drop-down cells are, I would edit the Data Validation by
typing "=List" (without the quotation marks) into the Source box and click OK.



"Yuvraj" wrote:

Hi All,

I need to know a way where I can key in a data validation in cell.

I have a range A1: A45

I have names in it but with blanks in between them

I cannot delete the blanks as it is a business requirement. But the
validation which I have added to a group of cells which on click of
drop down should only get the names from A1:A45 and not display the
blanks in between as it looks awkward.

Questions:

Can this be done with the help of a single excel function
or there is any other way to do this via code.

Kind Regards,

Yuvraj
.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default How to Delete blanks between a range and populate only the names i

You could copy the cells to another worksheet if you wanted before doing the
sort and naming the range.


Gord Dibben MS Excel MVP

On Wed, 4 Nov 2009 11:07:02 -0800, abe1952
wrote:

I don't deal much with VBA so I'll try to help you by guiding you through
various simple but logical steps, the way I would do it myself.

1. I would copy the names from cells A1 to A45 into a helper column way into
the right, say column Z, or somewhere closer if you don't mind this new
column being seen.

2. Having copied the names into cells Z1 to Z45, and while that range is
still selected, I would sort this range A to Z. This would bring all the
names up to cells Z1 to Z23.

3. I would then select cells Z1 to Z23 and assign a name to it, say "List"
and save the workbook.

4. Then where the drop-down cells are, I would edit the Data Validation by
typing "=List" (without the quotation marks) into the Source box and click OK.



"Yuvraj" wrote:

Hi All,

I need to know a way where I can key in a data validation in cell.

I have a range A1: A45

I have names in it but with blanks in between them

I cannot delete the blanks as it is a business requirement. But the
validation which I have added to a group of cells which on click of
drop down should only get the names from A1:A45 and not display the
blanks in between as it looks awkward.

Questions:

Can this be done with the help of a single excel function
or there is any other way to do this via code.

Kind Regards,

Yuvraj
.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to delete a hundred range names at once? Dima Excel Discussion (Misc queries) 4 August 7th 08 11:26 AM
How to delete a hundred range names at once? Dima Excel Worksheet Functions 4 August 7th 08 11:26 AM
copy range of cells with blanks then paste without blanks justaguyfromky Excel Worksheet Functions 1 September 3rd 06 07:56 PM
Selecting range in list of range names depending on a cell informa Courreges Excel Discussion (Misc queries) 2 June 19th 06 10:59 AM
not delete worksheets from names in a range DARREN FONG Excel Discussion (Misc queries) 3 November 11th 05 06:31 PM


All times are GMT +1. The time now is 01:24 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"