[Solved] Conditional formatting on two whole columns

Discuss the spreadsheet application
Post Reply
hannihannelora
Posts: 7
Joined: Sat Apr 14, 2018 8:21 am

[Solved] Conditional formatting on two whole columns

Post by hannihannelora »

Hi,

I want the cells of column B to become red if the number in the cell do not mach the number in the cell from the same row in column A.

Is this possible without doing the conditional formatting on every cell on column B separately? (For ex. like this A2:A10 equal to B2:B10)?
Last edited by robleyd on Thu Apr 19, 2018 8:47 am, edited 3 times in total.
Reason: Add green tick [robleyd, Moderator]
OpenOffice 4.1.2 ; Windows 7
FJCC
Moderator
Posts: 9277
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: Conditional formatting on two whole columns

Post by FJCC »

Select all of the cells in column B that you want to affect, say B1:B100. Notice which cell the cursor ends up in. Go to Formatting -> Conditional Formatting and Set up the formula of the conditional formatting as appropriate for the cell that the cursor is in. For example, if you drag down from B1 to B100, leaving the cursor in B100, the formula will be

Code: Select all

B100 <> A100
All of the other selected cells will get a formula of the same type but with the references adjusted for their row.
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
User avatar
robleyd
Moderator
Posts: 5084
Joined: Mon Aug 19, 2013 3:47 am
Location: Murbko, Australia

Re: Conditional formatting on two whole columns

Post by robleyd »

Try formatting the first cell, B1, using relative notation - type A1 into the field rather than clicking on A1 - and then either drag B1 down as far as you nee, or use the format paintbrush to copy B1 down as far as you need.
Cheers
David
OS - Slackware 15 64 bit
Apache OpenOffice 4.1.15
LibreOffice 24.2.2.2; SlackBuild for 24.2.2 by Eric Hameleers
hannihannelora
Posts: 7
Joined: Sat Apr 14, 2018 8:21 am

Re: Conditional formatting on two whole columns

Post by hannihannelora »

FJCC wrote:Select all of the cells in column B that you want to affect, say B1:B100. Notice which cell the cursor ends up in. Go to Formatting -> Conditional Formatting and Set up the formula of the conditional formatting as appropriate for the cell that the cursor is in. For example, if you drag down from B1 to B100, leaving the cursor in B100, the formula will be

Code: Select all

B100 <> A100
All of the other selected cells will get a formula of the same type but with the references adjusted for their row.
Thanks. It works really well. :)
OpenOffice 4.1.2 ; Windows 7
Post Reply