Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
johnny
 
Posts: n/a
Default How can I compare a number against a list of numbers

In Excel 2003, I have a row of 7 numbers and wish to find if any of those
numbers is in a vertical list of 24 numbers and to highlight the numbers
which are on the vertical list.
Have tried writing a macro but have failed!
  #2   Report Post  
Jason Morin
 
Posts: n/a
Default

Select the range of 24 numbers, go to Format
Conditional Formatting, select "Formula Is", and put:

=COUNTIF(rng,INDIRECT("rc",0))

where "rng" is a defined name for the range of 7 numbers.

Press the Format button and format as desired.

HTH
Jason
Atlanta, GA

-----Original Message-----
In Excel 2003, I have a row of 7 numbers and wish to

find if any of those
numbers is in a vertical list of 24 numbers and to

highlight the numbers
which are on the vertical list.
Have tried writing a macro but have failed!
.

  #3   Report Post  
Duke Carey
 
Posts: n/a
Default

Very nice

"Jason Morin" wrote:

Select the range of 24 numbers, go to Format
Conditional Formatting, select "Formula Is", and put:

=COUNTIF(rng,INDIRECT("rc",0))

where "rng" is a defined name for the range of 7 numbers.

Press the Format button and format as desired.

HTH
Jason
Atlanta, GA

-----Original Message-----
In Excel 2003, I have a row of 7 numbers and wish to

find if any of those
numbers is in a vertical list of 24 numbers and to

highlight the numbers
which are on the vertical list.
Have tried writing a macro but have failed!
.


  #4   Report Post  
ww
 
Posts: n/a
Default

Nice. Is there a way to do the opposite as far as highlighting the numbers
in the range of 24 that are not in the range of 7 numbers?

"Jason Morin" wrote:

Select the range of 24 numbers, go to Format
Conditional Formatting, select "Formula Is", and put:

=COUNTIF(rng,INDIRECT("rc",0))

where "rng" is a defined name for the range of 7 numbers.

Press the Format button and format as desired.

HTH
Jason
Atlanta, GA

-----Original Message-----
In Excel 2003, I have a row of 7 numbers and wish to

find if any of those
numbers is in a vertical list of 24 numbers and to

highlight the numbers
which are on the vertical list.
Have tried writing a macro but have failed!
.


  #5   Report Post  
Jason Morin
 
Posts: n/a
Default

Thanks. You can use:

=COUNTIF(rng,INDIRECT("rc",0))=0

Jason

-----Original Message-----
Nice. Is there a way to do the opposite as far as

highlighting the numbers
in the range of 24 that are not in the range of 7

numbers?

"Jason Morin" wrote:

Select the range of 24 numbers, go to Format
Conditional Formatting, select "Formula Is", and put:

=COUNTIF(rng,INDIRECT("rc",0))

where "rng" is a defined name for the range of 7

numbers.

Press the Format button and format as desired.

HTH
Jason
Atlanta, GA

-----Original Message-----
In Excel 2003, I have a row of 7 numbers and wish to

find if any of those
numbers is in a vertical list of 24 numbers and to

highlight the numbers
which are on the vertical list.
Have tried writing a macro but have failed!
.


.

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
finding the second largest number in a list bobf Excel Discussion (Misc queries) 1 February 16th 05 01:19 PM
Excel formula divide list of #s by N to get a number above 40 JudyK Excel Discussion (Misc queries) 11 February 9th 05 08:51 PM
How do I pick a number from a list in Excel? pugsly8422 Excel Worksheet Functions 4 January 3rd 05 06:07 PM
Lookup closest number in list Jeff Excel Discussion (Misc queries) 6 November 26th 04 07:27 PM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


All times are GMT +1. The time now is 10:34 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"