PC Review


Reply
Thread Tools Rate Thread

Changing the text within a function based on a cell reference.

 
 
jedale@gmail.com
Guest
Posts: n/a
 
      14th Jul 2006
I have multiple defined ranges that I called "List1", "List2"..........
all the way to "List61". I could manually input the new lists names
into the function everytime I fill down but this is a tedious job. I
was wondering if there was a way to have a the function call a seperate
cell to get the number and append it onto the defined range? This way
when I do fill down the List name automatically changes with the
contents of the referenced cell. Is this possible?

Here is the function I am using....
{=SUM(IF(FREQUENCY(IF(LEN(List1)>0,MATCH(List1,List1,0),""),
IF(LEN(List1)>0,MATCH(List1,List1,0),""))>0,1))}
The next in line would be..........
{=SUM(IF(FREQUENCY(IF(LEN(List2)>0,MATCH(List2,List2,0),""),
IF(LEN(List2)>0,MATCH(List2,List2,0),""))>0,1))}

This works fine the way it is but tedious when I want to update.

Here is an attempt to work a solution so far...............
=SUM(IF(FREQUENCY(IF(LEN(List&A31)>0,MATCH(List&A31,List&A31,0),""),
IF(LEN(List&A31)>0,MATCH(List&A31,List&A31,0),""))>0,1))

Where A31 is the number 1,2,3,4,5,6,7.......61.
I get an error with this and if I do the following....

=SUM(IF(FREQUENCY(IF(LEN("List"&A31)>0,MATCH("List"&A31,"List"&A31,0),""),
IF(LEN("List"&A31)>0,MATCH("List"&A31,"List"&A31,0),""))>0,1))

it appends the List with the number like "List29" The problem with this
is that the length function returns a value based on List29 being text
and not a defined range.

Does anybody know of a way to do this?
Thanks in advanced
Jeff

 
Reply With Quote
 
 
 
 
Bob Phillips
Guest
Posts: n/a
 
      14th Jul 2006
=SUM(IF(FREQUENCY(IF(LEN(INDIRECT("List"&A31))>0,MATCH(INDIRECT("List"&A31),
INDIRECT("List"&A31),0),""),
IF(LEN(INDIRECT("List"&A31))>0,MATCH(INDIRECT("List"&A31),INDIRECT("List"&A3
1),0),""))>0,1))

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I have multiple defined ranges that I called "List1", "List2"..........
> all the way to "List61". I could manually input the new lists names
> into the function everytime I fill down but this is a tedious job. I
> was wondering if there was a way to have a the function call a seperate
> cell to get the number and append it onto the defined range? This way
> when I do fill down the List name automatically changes with the
> contents of the referenced cell. Is this possible?
>
> Here is the function I am using....
> {=SUM(IF(FREQUENCY(IF(LEN(List1)>0,MATCH(List1,List1,0),""),
> IF(LEN(List1)>0,MATCH(List1,List1,0),""))>0,1))}
> The next in line would be..........
> {=SUM(IF(FREQUENCY(IF(LEN(List2)>0,MATCH(List2,List2,0),""),
> IF(LEN(List2)>0,MATCH(List2,List2,0),""))>0,1))}
>
> This works fine the way it is but tedious when I want to update.
>
> Here is an attempt to work a solution so far...............
> =SUM(IF(FREQUENCY(IF(LEN(List&A31)>0,MATCH(List&A31,List&A31,0),""),
> IF(LEN(List&A31)>0,MATCH(List&A31,List&A31,0),""))>0,1))
>
> Where A31 is the number 1,2,3,4,5,6,7.......61.
> I get an error with this and if I do the following....
>
> =SUM(IF(FREQUENCY(IF(LEN("List"&A31)>0,MATCH("List"&A31,"List"&A31,0),""),
> IF(LEN("List"&A31)>0,MATCH("List"&A31,"List"&A31,0),""))>0,1))
>
> it appends the List with the number like "List29" The problem with this
> is that the length function returns a value based on List29 being text
> and not a defined range.
>
> Does anybody know of a way to do this?
> Thanks in advanced
> Jeff
>



 
Reply With Quote
 
jedale@gmail.com
Guest
Posts: n/a
 
      14th Jul 2006
Works like a charm.. Thanks

I never knew about the indirect function, I will look into it now.

Thanks

Jeff

 
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
Changing a color in a cell based on the text in another cell Ryan Microsoft Excel Misc 3 13th Nov 2008 10:17 PM
Cell reference based on variable text string hl@greenreefers.no Microsoft Excel Worksheet Functions 1 25th Apr 2008 11:57 AM
Re: Changing cell text color based on cell number W. Wheeler Microsoft Excel Programming 1 23rd Apr 2007 07:24 AM
Re: Changing cell text color based on cell number W. Wheeler Microsoft Excel Programming 0 22nd Apr 2007 11:56 PM
Changing cell text color based on cell number =?Utf-8?B?c2NvdHR5?= Microsoft Excel Programming 9 14th Apr 2007 06:34 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:50 AM.