Conditional formatting using lookup

F

freestra

I have a sheet to which I would like to apply conditional formatting.
The formatting to be applied is dependant on the value of a cell in
each row. That cell will contain a value based on a list (which I have
set up using validation).

The Validation list contains one column that has the format name and
the adjacent cell in each column will contain a sample format which the
user can change by applying different font, colour background etc. I
could restrict the formats that may be applied to say Bold, size,
shading, or such like if that would make it possible to only use
conditional formatting as opposed to using VBA.

I am doing this so that the user can choose what each format will look
like by applying the format to the cell adjacent to the format list.
This is so that when printing the sheet the user can differentiate
certain rows. I can't use colour only because the user may not have a
colour printer nor can I apply arbitrary font or background patterns
because what may work for me may be unreadable to another user.

Is it Possible to do this using conditional formatting only?
If so how can I determine the formats to apply based on the lookup
value?

If this is not possible using conditional formatting can it be done
using a function to a VBA procedure? A sample would be great!

My sheet is as follows.
Row 1 contains headings
Column 1 on each row from 2 on, contains the format name to apply.
The content of the rest of the row is irrelevant.


The format/sample list can be at the end of the main content. The
example blow has three different formats, In the actual sheet I need
(at least) seven different format.

Thanks oin advance,
Cheers
TonyS.


e.g.

A B C
1 RowFormat Month Category
2 Format1 Aug Communications
3 Format2 Aug Communications
4 Format1 Aug Investigation
5 Format1 Aug Resolution
6 Format3 Aug Appraisal
7 Format3 Aug Communications
8 Format2 Aug Communications
9 Format2 Aug Communications
10 Format2 Aug Communications


Formats
20 Format1 Sample
21 Format2 Sample
22 Format3 Sample

The samples could be formatted say as;
Format 1 Sample text: Blue text old font
Format 2 Sample text: Brown text with dotted shading
Format 3 Sample text: white text on blue background.
 
D

Dave Peterson

Select the range you want to apply the conditional formatting.

Say A2:X9999

And with the activecell in row 2, you can use:
format|conditional formatting
formula is
=$a2="format 1"
(apply the formatting you want)

And add another condition and do the similar things.

By anchoring the formula--the $ in front of the column letter, excel will adjust
the formula (by changing the row), but never change the column to check.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top