Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Highlighting matching cells in two different worksheets

Worksheet 1 consists of a single column containing the first 1000
prime numbers. Worksheet 2 consists of multiple columns of numbers.
Is there a way to highlight with a chosen fill color all cells in
worksheet 2 containing prime numbers from worksheet 1? Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Highlighting matching cells in two different worksheets

Use Conditional formatting with a Named range.

Say Sheet1 has the numbers in column A. Click on column A and:

Insert Name Define and use the Name colA.

Then click on a typical cell in Sheet2 (say B1) and:

Format Conditional Formatting... FormulaIs

=COUNTIF(colA,B1)0 and pick the color.

NOTE that without the Defined Name, conditional formatting will not work
across sheets.
--
Gary''s Student - gsnu2007L


" wrote:

Worksheet 1 consists of a single column containing the first 1000
prime numbers. Worksheet 2 consists of multiple columns of numbers.
Is there a way to highlight with a chosen fill color all cells in
worksheet 2 containing prime numbers from worksheet 1? Thanks.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,805
Default Highlighting matching cells in two different worksheets

Can you copy Col A from Sheet1 to the sheet which you want to higlight?

If you can then assuming you copied it to Col Z do the following;
Select the range you want to highlight (assuming it starts at A1, if not
then change A1 below to the first cell)
Choose Conditional Formatting
Chooe Formula IS
Type the formula
=NOT(ISNA(VLOOKUP(A1,$Z:$Z,1,FALSE)))
Choose the format you want


" wrote:

Worksheet 1 consists of a single column containing the first 1000
prime numbers. Worksheet 2 consists of multiple columns of numbers.
Is there a way to highlight with a chosen fill color all cells in
worksheet 2 containing prime numbers from worksheet 1? Thanks.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 857
Default Highlighting matching cells in two different worksheets

Hi,

0. Name the range containing the 1000 primes Primes
1. On the other sheet select ALL the data, for this example, I will assume
A1 is the first cell of the selection.
---
In 2003:
2. Choose Format, Conditional Formatting
3. Choose Formula is from the first drop down
4. In the second box enter the formula:

=OR(A1=Primes)

5. Click the Format button
6. Choose a color on the Patterns tab (or any available option)
7. Click OK twice.

In 2007:
1. Highlight all the cells on the rows you want formatted
2. Choose Home, Conditional Formatting, New Rule
3. Choose Use a formula to determine which cell to format
4. In the Format values where this formula is true enter the following
formula:

=OR(A1=Primes)

5. Click the Format button and choose a format.
6. Click OK twice

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


" wrote:

Worksheet 1 consists of a single column containing the first 1000
prime numbers. Worksheet 2 consists of multiple columns of numbers.
Is there a way to highlight with a chosen fill color all cells in
worksheet 2 containing prime numbers from worksheet 1? 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
Matching Cells on different worksheets Tom D[_3_] Excel Discussion (Misc queries) 3 May 30th 07 07:06 PM
Highlighting non-matching ZIP in a batch Scotty_MK Excel Discussion (Misc queries) 3 August 10th 06 04:10 PM
How do I compare data in two worksheets to find matching cells? Gary Excel Discussion (Misc queries) 4 March 2nd 06 09:04 PM
Highlighting blanks via GO TO SPECIAL is not highlighting blank cells - HELP, I'm totally stuck. Jamie Furlong Excel Discussion (Misc queries) 6 August 28th 05 09:27 PM
finding matching cells in worksheets Marcin Wolku Excel Worksheet Functions 1 August 25th 05 04:46 PM


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