LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15
Default Comparing Text to Several Cells

I am trying to compare the word in one specific cell to the word in several
other cells in a single column. The purpose is that the cell were the code is
should display a specific word if the comparision is equal, if not it should
display the word in the specific cell you want to compare with the column.

I have managed to do this but in the way I do it I have to write a hell of a
lot of code since it is many cells that the specific cell should be compared
to. This is probably easily solved, or at least it feals like it should be
easily solved if you know the program a bit better. The code I use is:


=IF(OR(I6=B4;I6=B5;I6=B6;I6=B7;I6=B8;I6=B9;I6=B10; I6=B11;I6=B12);B2;I6)


As you see I now compare cell "I6" with cells B4 to B12 why the code isn't
redicolously long but I would like to compare to many more cells and then it
will be. My initial fealing was to write B4:B12 but this gave the error
"#value" which is natural since ":" make a sum but it is something similar I
would like to do, short and simple.

If anybody has a solution to this I would be highly grateful.

thanks
Pontus
 
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
Comparing cells and output text Rocketeer Excel Worksheet Functions 7 May 19th 08 12:14 AM
Comparing text within cells in two columns Billing Excel Worksheet Functions 2 April 30th 07 02:00 PM
Comparing cells with text Mortir Excel Worksheet Functions 4 January 3rd 07 10:54 PM
comparing text cells Comander Excel Worksheet Functions 2 June 5th 06 10:00 PM
Comparing text strings in cells Andy Excel Discussion (Misc queries) 0 January 11th 06 10:38 AM


All times are GMT +1. The time now is 08:53 PM.

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

About Us

"It's about Microsoft Excel"