PC Review


Reply
Thread Tools Rate Thread

Automatically create ranges and then name them

 
 
Sarah Cichos
Guest
Posts: n/a
 
      12th Sep 2011
Hi,

I have the following problem... for roughly 12K rows & 2 columns, I
want to define ranges & names without manually going through.
How do I do that??

Example (only taking 10 rows here for simplicity):

A B
1 John 5
2 John 6
3 John 7
4 Max 3
5 Max 4
6 Lucy 52
7 Lucy 53
8 Lucy 54
9 Lucy 55
10 Theo 13

I'll want to name range B1:B3 "John", range B4:B5 "Max", etc.

Thanks in advance!
Sarah

 
Reply With Quote
 
 
 
 
lifescholar
Guest
Posts: n/a
 
      12th Sep 2011
On Sep 12, 9:34*pm, Sarah Cichos <sarah.cic...@gmail.com> wrote:
> Hi,
>
> I have the following problem... for roughly 12K rows & 2 columns, I
> want to define ranges & names without manually going through.
> How do I do that??
>
> Example (only taking 10 rows here for simplicity):
>
> * * * *A * * * *B
> 1 * John * * * * 5
> 2 * John * * * * 6
> 3 * John * * * * 7
> 4 * Max *3
> 5 * Max *4
> 6 * Lucy * * * * 52
> 7 * Lucy * * * * 53
> 8 * Lucy * * * * 54
> 9 * Lucy * * * * 55
> 10 Theo *13
>
> I'll want to name range B1:B3 "John", range B4:B5 "Max", etc.
>
> Thanks in advance!
> Sarah


This requires a macro. However, before writing one, it would be useful
what you are planning to do with these ranges afterwards. Are you
trying to look-up in them, or calculate totals, etc? If so, then you
don't need to define names, there are other ways to do this.

Perhaps you could post a little more info.
 
Reply With Quote
 
Sarah Cichos
Guest
Posts: n/a
 
      12th Sep 2011
On Sep 12, 1:58*pm, lifescholar <steve.ja...@lifescholar.net> wrote:
> On Sep 12, 9:34*pm, Sarah Cichos <sarah.cic...@gmail.com> wrote:
>
>
>
>
>
>
>
>
>
> > Hi,

>
> > I have the following problem... for roughly 12K rows & 2 columns, I
> > want to define ranges & names without manually going through.
> > How do I do that??

>
> > Example (only taking 10 rows here for simplicity):

>
> > * * * *A * * * *B
> > 1 * John * * * * 5
> > 2 * John * * * * 6
> > 3 * John * * * * 7
> > 4 * Max *3
> > 5 * Max *4
> > 6 * Lucy * * * * 52
> > 7 * Lucy * * * * 53
> > 8 * Lucy * * * * 54
> > 9 * Lucy * * * * 55
> > 10 Theo *13

>
> > I'll want to name range B1:B3 "John", range B4:B5 "Max", etc.

>
> > Thanks in advance!
> > Sarah

>
> This requires a macro. However, before writing one, it would be useful
> what you are planning to do with these ranges afterwards. Are you
> trying to look-up in them, or calculate totals, etc? If so, then you
> don't need to define names, there are other ways to do this.
>
> Perhaps you could post a little more info.


Thanks for looking into it. I was planning to lookup the range names
(with an index function) and then concatenate the information from
column B into one cell, separated by comma. My results should look
like this (based on the example above):
John 5, 6, 7
Max 3, 4
Lucy 52, 53, 54, 55
Theo 13

I have all that already, I only need to find a way to name the ranges
to pull this data.
If there's an easier way to do that, I'll gladly take it!
 
Reply With Quote
 
Sarah Cichos
Guest
Posts: n/a
 
      12th Sep 2011
On Sep 12, 2:33*pm, Sarah Cichos <sarah.cic...@gmail.com> wrote:
> On Sep 12, 1:58*pm, lifescholar <steve.ja...@lifescholar.net> wrote:
>
>
>
>
>
>
>
>
>
> > On Sep 12, 9:34*pm, Sarah Cichos <sarah.cic...@gmail.com> wrote:

>
> > > Hi,

>
> > > I have the following problem... for roughly 12K rows & 2 columns, I
> > > want to define ranges & names without manually going through.
> > > How do I do that??

>
> > > Example (only taking 10 rows here for simplicity):

>
> > > * * * *A * * * *B
> > > 1 * John * * * * 5
> > > 2 * John * * * * 6
> > > 3 * John * * * * 7
> > > 4 * Max *3
> > > 5 * Max *4
> > > 6 * Lucy * * * * 52
> > > 7 * Lucy * * * * 53
> > > 8 * Lucy * * * * 54
> > > 9 * Lucy * * * * 55
> > > 10 Theo *13

>
> > > I'll want to name range B1:B3 "John", range B4:B5 "Max", etc.

>
> > > Thanks in advance!
> > > Sarah

>
> > This requires a macro. However, before writing one, it would be useful
> > what you are planning to do with these ranges afterwards. Are you
> > trying to look-up in them, or calculate totals, etc? If so, then you
> > don't need to define names, there are other ways to do this.

>
> > Perhaps you could post a little more info.

>
> Thanks for looking into it. I was planning to lookup the range names
> (with an index function) and then concatenate the information from
> column B into one cell, separated by comma. My results should look
> like this (based on the example above):
> John 5, 6, 7
> Max 3, 4
> Lucy 52, 53, 54, 55
> Theo 13
>
> I have all that already, I only need to find a way to name the ranges
> to pull this data.
> If there's an easier way to do that, I'll gladly take it!


One more thing: I'm not looking to sum these numbers up. So, sumif
won't do
 
Reply With Quote
 
Sarah Cichos
Guest
Posts: n/a
 
      12th Sep 2011
On Sep 12, 2:33*pm, Sarah Cichos <sarah.cic...@gmail.com> wrote:
> On Sep 12, 1:58*pm, lifescholar <steve.ja...@lifescholar.net> wrote:
>
>
>
>
>
>
>
>
>
> > On Sep 12, 9:34*pm, Sarah Cichos <sarah.cic...@gmail.com> wrote:

>
> > > Hi,

>
> > > I have the following problem... for roughly 12K rows & 2 columns, I
> > > want to define ranges & names without manually going through.
> > > How do I do that??

>
> > > Example (only taking 10 rows here for simplicity):

>
> > > * * * *A * * * *B
> > > 1 * John * * * * 5
> > > 2 * John * * * * 6
> > > 3 * John * * * * 7
> > > 4 * Max *3
> > > 5 * Max *4
> > > 6 * Lucy * * * * 52
> > > 7 * Lucy * * * * 53
> > > 8 * Lucy * * * * 54
> > > 9 * Lucy * * * * 55
> > > 10 Theo *13

>
> > > I'll want to name range B1:B3 "John", range B4:B5 "Max", etc.

>
> > > Thanks in advance!
> > > Sarah

>
> > This requires a macro. However, before writing one, it would be useful
> > what you are planning to do with these ranges afterwards. Are you
> > trying to look-up in them, or calculate totals, etc? If so, then you
> > don't need to define names, there are other ways to do this.

>
> > Perhaps you could post a little more info.

>
> Thanks for looking into it. I was planning to lookup the range names
> (with an index function) and then concatenate the information from
> column B into one cell, separated by comma. My results should look
> like this (based on the example above):
> John 5, 6, 7
> Max 3, 4
> Lucy 52, 53, 54, 55
> Theo 13
>
> I have all that already, I only need to find a way to name the ranges
> to pull this data.
> If there's an easier way to do that, I'll gladly take it!


Never mind - I found a way! It includes match to look up the position
of the name and then indirect(address)... to locate the lookup. Thank
you anyway!
 
Reply With Quote
 
Sarah Cichos
Guest
Posts: n/a
 
      12th Sep 2011
On Sep 12, 2:35*pm, Sarah Cichos <sarah.cic...@gmail.com> wrote:
> On Sep 12, 2:33*pm, Sarah Cichos <sarah.cic...@gmail.com> wrote:
>
>
>
>
>
>
>
>
>
> > On Sep 12, 1:58*pm, lifescholar <steve.ja...@lifescholar.net> wrote:

>
> > > On Sep 12, 9:34*pm, Sarah Cichos <sarah.cic...@gmail.com> wrote:

>
> > > > Hi,

>
> > > > I have the following problem... for roughly 12K rows & 2 columns, I
> > > > want to define ranges & names without manually going through.
> > > > How do I do that??

>
> > > > Example (only taking 10 rows here for simplicity):

>
> > > > * * * *A * * * *B
> > > > 1 * John * * * * 5
> > > > 2 * John * * * * 6
> > > > 3 * John * * * * 7
> > > > 4 * Max *3
> > > > 5 * Max *4
> > > > 6 * Lucy * * * * 52
> > > > 7 * Lucy * * * * 53
> > > > 8 * Lucy * * * * 54
> > > > 9 * Lucy * * * * 55
> > > > 10 Theo *13

>
> > > > I'll want to name range B1:B3 "John", range B4:B5 "Max", etc.

>
> > > > Thanks in advance!
> > > > Sarah

>
> > > This requires a macro. However, before writing one, it would be useful
> > > what you are planning to do with these ranges afterwards. Are you
> > > trying to look-up in them, or calculate totals, etc? If so, then you
> > > don't need to define names, there are other ways to do this.

>
> > > Perhaps you could post a little more info.

>
> > Thanks for looking into it. I was planning to lookup the range names
> > (with an index function) and then concatenate the information from
> > column B into one cell, separated by comma. My results should look
> > like this (based on the example above):
> > John 5, 6, 7
> > Max 3, 4
> > Lucy 52, 53, 54, 55
> > Theo 13

>
> > I have all that already, I only need to find a way to name the ranges
> > to pull this data.
> > If there's an easier way to do that, I'll gladly take it!

>
> One more thing: I'm not looking to sum these numbers up. So, sumif
> won't do


 
Reply With Quote
 
lifescholar
Guest
Posts: n/a
 
      12th Sep 2011
On Sep 12, 10:42*pm, Sarah Cichos <sarah.cic...@gmail.com> wrote:
> On Sep 12, 2:33*pm, Sarah Cichos <sarah.cic...@gmail.com> wrote:
>
>
>
>
>
>
>
>
>
> > On Sep 12, 1:58*pm, lifescholar <steve.ja...@lifescholar.net> wrote:

>
> > > On Sep 12, 9:34*pm, Sarah Cichos <sarah.cic...@gmail.com> wrote:

>
> > > > Hi,

>
> > > > I have the following problem... for roughly 12K rows & 2 columns, I
> > > > want to define ranges & names without manually going through.
> > > > How do I do that??

>
> > > > Example (only taking 10 rows here for simplicity):

>
> > > > * * * *A * * * *B
> > > > 1 * John * * * * 5
> > > > 2 * John * * * * 6
> > > > 3 * John * * * * 7
> > > > 4 * Max *3
> > > > 5 * Max *4
> > > > 6 * Lucy * * * * 52
> > > > 7 * Lucy * * * * 53
> > > > 8 * Lucy * * * * 54
> > > > 9 * Lucy * * * * 55
> > > > 10 Theo *13

>
> > > > I'll want to name range B1:B3 "John", range B4:B5 "Max", etc.

>
> > > > Thanks in advance!
> > > > Sarah

>
> > > This requires a macro. However, before writing one, it would be useful
> > > what you are planning to do with these ranges afterwards. Are you
> > > trying to look-up in them, or calculate totals, etc? If so, then you
> > > don't need to define names, there are other ways to do this.

>
> > > Perhaps you could post a little more info.

>
> > Thanks for looking into it. I was planning to lookup the range names
> > (with an index function) and then concatenate the information from
> > column B into one cell, separated by comma. My results should look
> > like this (based on the example above):
> > John 5, 6, 7
> > Max 3, 4
> > Lucy 52, 53, 54, 55
> > Theo 13

>
> > I have all that already, I only need to find a way to name the ranges
> > to pull this data.
> > If there's an easier way to do that, I'll gladly take it!

>
> Never mind - I found a way! It includes match to look up the position
> of the name and then indirect(address)... to locate the lookup. Thank
> you anyway!


No problem.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Making ranges adjust automatically Nelson B. Microsoft Excel Programming 4 22nd Aug 2008 06:15 PM
How do I automatically create ranges? =?Utf-8?B?RXhjZWxIZWxwUGxlYXNl?= Microsoft Excel Misc 11 27th Jul 2007 07:31 AM
Automatically Defining Ranges mryclept2@yahoo.com Microsoft Excel Programming 4 5th May 2005 09:13 PM
How do I automatically plot different ranges of data in different. =?Utf-8?B?M0QtY2hhcnRpbmc=?= Microsoft Excel Charting 1 2nd Feb 2005 02:40 PM
Automatically Increasing Chart Ranges kiza Microsoft Excel Programming 2 2nd May 2004 12:43 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:08 AM.