Forum Discussion
Format an entire row.
I need to format an entire row colour based on any date being entered in one cell in that row and have it applied to the whole page.
Hi mate, thanks for your reply but does not seem to work. If one of my share holdings gets sold I would like to have that particular row change colour so that it is easier to keep track of which shares I am still holding. Will try and attach the file. You can see where I have coloured the rows manually, i would like this to happen for every sold share if possible.
4 Replies
You haven't specified any details, so I'll provide a random example. Let's say you want to highlight a row if the Sell Date is more than 30 days after the Purchase Date.
Select the entire range from row 2 down to the last used row.
I will assume that the active cell in the selection is in row 2.
On the Home tab of the ribbon, select Conditional Formatting > New Rule...
Select 'Use a formula to determine which cells to format'.
Enter the formula
=$N2-$A2>30
The $ signs before the column letters are essential here - the "fix" the columns.
Click Format...
Actvate the Fill tab.
Select a color.
Click OK, then click OK again.
- Rick64Copper Contributor
Hi mate, thanks for your reply but does not seem to work. If one of my share holdings gets sold I would like to have that particular row change colour so that it is easier to keep track of which shares I am still holding. Will try and attach the file. You can see where I have coloured the rows manually, i would like this to happen for every sold share if possible.
So a row should be highlighted if column N has a date?
You'd use the formulka =$N2<>"" in the conditional formatting rule.
See the attached version.