can you make a macro automatially fill a cell with a certain colour?

manaz

New Member
Joined
Mar 18, 2009
Messages
15
Can anyone tell me if you can write a macro to inset a certain colour (fill) into a row of information once a specific cell has an entry entered (ie is not blank)

Cheers
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Re: can yo make a macro automatially fill a cell with a certain colour?

Yes

Not by macro but by Conditional Formatting highlight the cell you wish to highlight then use Format>>Condition Formatting>>Formula Is: =A1=""

Given A1 is the blank cell you refer to

EDIT: Yes a Macro can do it but try the built-in function first
 
Last edited:
Upvote 0
thats great thanks, but can you make it fill the row that the specific cell is in, i.e. cell N3 has text in it and yo want to highlight fom column A3 to N3?
 
Upvote 0
Welcome to the Board!

Sure,

Just select A3:Nxx for as many rows as you want to apply the formatting and use =$N3<>"" (note the $)

HTH,
 
Upvote 0
thanks that worked perfect, but i would like it to apply to a whole sheet, so every cell in column 'N' that has text in it is highlighted from column 'A' to 'L'.
 
Upvote 0
Select column A then hold down the Shift key, End Key + Down Arrow key, then still holding down the shift key use the right arrow key until you get to N. Then open Conditional Formatting and apply your formula.

Or use the mouse to select the columns.
 
Upvote 0

Forum statistics

Threads
1,214,643
Messages
6,120,702
Members
448,980
Latest member
CarlosWin

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