Copying conditional formating

P

Paul

Hi All,

I need to copy the folowwing conditional fromat into my spreadsheet

Formula Is =COUNTIF(A4:G4,"Y")

I want to copy this so if G8= Y cells A8:G8 go grey etc
I have set the format but it wont copy. I have been paying around with the
$ sign but still no joy

My head hurts please help

VMT Paul
 
J

Joel

The conditional formating requires a boolean (true or false) to be returned.
Your expression returns a number. You really want something like this

COUNTIF($A4:$G4,"Y")>=1

enter the conditional formating in Format - Conditional Format and change
"Cell Value is" to "formula is". enter your formula in the 1st box and
sleect the Pattern (color). Because the columns are always going to be A - G
put a dollar sign in front of the Column Letters.


To copy conditional formating you need to use PasteSpecial with format
selected. Put the conditional formating in one cell then copy and use
PasteSpecial in the other cells.
 
P

Pete_UK

Highlight the cells A8:G8, then click on Format | Conditional
Formatting. In the pop-up you should select Formula Is rather than
Cell Value Is in the first box, and enter this formula:

=$G8="Y"

Then you can click on the Format button and if you want the background
colour to be grey you need to click the Patterns tab and then choose
grey. Click OK twice to exit the dialogue boxes.

If you want to apply the same formatting to other rows, then highlight
A8:G8 and double click the Format Painter icon. Then you can click on
A9, A10, A11 etc in turn and the format will be applied. Press <Esc>
to cancel the Format Painter.

Hope this helps.

Pete
 
D

David Biddulph

I can't reconcile your formula with what you say you want to do.
If the condition for A8:G8 to be formatted is that G8=Y, the Formula Is
condition would be =$G8="Y".
 
P

Paul

Thanks very much Pete. Sorted

Pete_UK said:
Highlight the cells A8:G8, then click on Format | Conditional
Formatting. In the pop-up you should select Formula Is rather than
Cell Value Is in the first box, and enter this formula:

=$G8="Y"

Then you can click on the Format button and if you want the background
colour to be grey you need to click the Patterns tab and then choose
grey. Click OK twice to exit the dialogue boxes.

If you want to apply the same formatting to other rows, then highlight
A8:G8 and double click the Format Painter icon. Then you can click on
A9, A10, A11 etc in turn and the format will be applied. Press <Esc>
to cancel the Format Painter.

Hope this helps.

Pete
 

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