Conditional formatting

Lewis

Board Regular
Joined
Feb 16, 2002
Messages
50
I want to set up a sheet so that if I put data in Column A then I get a border round the cell AND the cells in the same row in columns B and C

Any suggestions
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Do you want a border around each of the 3 cells or a single border around all 3 of the cells?
 
Upvote 0
On 2002-03-01 08:13, Lewis wrote:
I want to set up a sheet so that if I put data in Column A then I get a border round the cell AND the cells in the same row in columns B and C

Any suggestions

Select all of the relevant cells of column A, B, and C.

Activate Format|Conditional Formatting.

Choose Formula Is for Condition 1.

Enter as formula:

=LEN($A1)>0

Activate Format.

Activate the relevant tabs for setting up the desired formatting.

Click OK, OK.
 
Upvote 0
Is there any way to prevent the formatting if you enter a formula in the first cell?
 
Upvote 0
Sorry I was not very explicit. if I put in a formula such as =X1 which will give a zero value if there is nothing in X1,it still gives me the formatting even if I hide the zero
 
Upvote 0
On 2002-03-02 03:53, Lewis wrote:
Sorry I was not very explicit. if I put in a formula such as =X1 which will give a zero value if there is nothing in X1,it still gives me the formatting even if I hide the zero

Use

=AND(LEN($A1)>0,$A1<>0)

or, if A is expected to house data of only numeric type,

=$A1<>0
 
Upvote 0
That is great another way I found was to use the original and make it >1 rather than >0 as I am interested in long text strings
 
Upvote 0
On 2002-03-02 05:08, Lewis wrote:
That is great another way I found was to use the original and make it >1 rather than >0 as I am interested in long text strings

Lewis,

You must be able to have a number like 4 in A. This number has a LEN of 1!

Aladin
 
Upvote 0

Forum statistics

Threads
1,223,355
Messages
6,171,608
Members
452,411
Latest member
sprichwort

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top