View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Leo Heuser Leo Heuser is offline
external usenet poster
 
Posts: 266
Default Conditional formatting

"phill" skrev i en meddelelse
...
Hi

I have a spreadsheet which i use to keep a record of stock in a shop and
it
has two tabs one for stock in store and another for obsolete stock. on
sheet
one i have a list of product codes and a description and on sheet two
there
is the same. how can i make the colums on sheet one ie. the product code
and
description show up red if the product appears on sheet 2?

many thanks

phill


Hi Phill

One way:

Assumptions: Product codes in columns A and
descriptions in columns B.

1. On sheet 2 select column A (click on the letter "A" on top
of the column)
2. Click in the name box (extreme left of the formula bar)
and enter a name for the selected range, e.g. "Data"
without quotes.
3. On sheet 1 select columns A and B as described.
4. Choose Formats Conditional formatting
5. In "Formula is" enter the formula =COUNTIF(Data,$A1)
(Notice that only the column is absolute ($).
6. Choose the wanted format with the button "Formats"
and OK. OK.

Points 1 and 2 are necessary because a formula in
conditional formatting must point to a global name.
=COUNTIF(Sheet2!A:A,$A1) won't work because
Sheet2!A:A is a local address, not a global one.
The same holds, if you have validation and the list
is on another sheet.


--
Best regards
Leo Heuser

Followup to newsgroup only please.