Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 79
Default create new variable

I have a list of names, 10 of which I want to keep as is and the others I
want to change to "all other" (there are too many to use find & replace).
Can I create a new column and new variable to do this?

Thanks,

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default create new variable

Hi Angie,

You could list the 10 names you want to keep, for example in C1:C10.
Then in B1 enter this formula:

=IF(ISNA(VLOOKUP(A1,C$1:C$10,1,0)),"All Other",A1)

and copy down column B by double-clicking the fill-icon (the small
black square in the bottom corner of the cursor. This assumes that your
names are in column A.

You could then highlight all the cells with the formula, click <copy,
then Edit | Paste Special | Values (check) | OK then <Esc in order to
fix the values.

Hope this helps.

Pete

Angie wrote:

I have a list of names, 10 of which I want to keep as is and the others I
want to change to "all other" (there are too many to use find & replace).
Can I create a new column and new variable to do this?

Thanks,


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default create new variable

Assuming the source names are in A1 down

Enter/list your 10 names to retain in B1:B10

Put in C1:
=IF(ISNUMBER(MATCH(A1,B:B,0)),A1,"All Other")
Copy C1 down to the last row of data in col A,
to return the required results
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Angie" wrote:
I have a list of names, 10 of which I want to keep as is and the others I
want to change to "all other" (there are too many to use find & replace).
Can I create a new column and new variable to do this?

Thanks,

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,118
Default create new variable

Try something like this:

With
Your list of all names in Col_A, beginning in A2
and
N1:N10 contains the list of names you want to "keep"

Try this in Col_B:
B2: =IF(COUNTIF($N$1:$N$10,A2),A2,"All Other")
Copy that formula down as far as you need

Then....just
select the Col_B formula cells
[Ctrl]+C......that's the shortcut for <edit<copy
<edit<paste special<values

Is that something you can work with?
***********
Regards,
Ron

XL2002, WinXP


"Angie" wrote:

I have a list of names, 10 of which I want to keep as is and the others I
want to change to "all other" (there are too many to use find & replace).
Can I create a new column and new variable to do this?

Thanks,

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 740
Default create new variable

you may also use OTHER ways,

your 10 names in A1:J1

=+IF(SUM((A2=$A$1:$J$1)*{1}),A2,"ALL OTHERS")
hit ctrl-shift-ent..

or =+IF(MAX((A2=$A$1:$J$1)*{1}),A2,"ALL OTHERS")
hit ctrl-shift-ent..
--
*****
birds of the same feather flock together..



"Ron Coderre" wrote:

Try something like this:

With
Your list of all names in Col_A, beginning in A2
and
N1:N10 contains the list of names you want to "keep"

Try this in Col_B:
B2: =IF(COUNTIF($N$1:$N$10,A2),A2,"All Other")
Copy that formula down as far as you need

Then....just
select the Col_B formula cells
[Ctrl]+C......that's the shortcut for <edit<copy
<edit<paste special<values

Is that something you can work with?
***********
Regards,
Ron

XL2002, WinXP


"Angie" wrote:

I have a list of names, 10 of which I want to keep as is and the others I
want to change to "all other" (there are too many to use find & replace).
Can I create a new column and new variable to do this?

Thanks,

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 create a drop down button on a worksheet? Re learning Excel Excel Worksheet Functions 3 August 14th 06 03:28 PM
How to Create a Macro to Edit a Variable Amount of Information Matt New Users to Excel 4 August 12th 06 10:05 PM
Create a tabular control rkg Excel Discussion (Misc queries) 0 August 8th 05 09:25 PM
why is it saying sheetcnt is "variable not defined" how to do a global variable to share over multiple functions in vba for excel? Daniel Excel Worksheet Functions 1 July 9th 05 03:05 AM
I Need VBA Assistance for global variable question Brent E Excel Discussion (Misc queries) 1 March 1st 05 08:46 PM


All times are GMT +1. The time now is 10:37 AM.

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"