Excel - Highlight Lowest Price in Each Row - excel

I'm trying to highlight the lowest price in each row for a price comparison spreadsheet. I have been having trouble using conditional formatting and wonder if there is a macro and VBA that does the job. Can someone help me on how to highlight the lowest price in each row excluding cells with values of "0" or blank. Thank you so much!
-The spreadsheet goes from column A to P
-Column C,F,I,L,O are the prices.
-Some price cells do not have a value and are displayed as "$ - " in accounting format.

No VBA required:
Copy and paste the following into the Name Box (upper-left corner of Excel):
C:C,F:F,I:I,L:L,O:O
And the press the Enter key.
This will select those columns.
Now click on the Home tab of the Ribbon and then click on:
Conditional Formatting -> New Rule -> Use a formula to determine which cells to format
In the textbox that reads Format values where this formula is true enter:
=C1=MIN(IF($C1=0,2E+99,$C1),IF($F1=0,2E+99,$F1),IF($I1=0,2E+99,$I1),IF($L1=0,2E+99,$L1),IF($O1=0,2E+99,$O1))
Finally, click the Format button to select the color you want and then confirm.

Related

Excel, when I click a row number, far left (example row 3) I want the information in show in formula bar

Excel, when I click a row number, far left (example row 3) I want the information in cell B3, C3, D3 to display in the formula box. I want it to do this for 50 rows. Can this be done without using VB editor?

Changing Color of a column based on other column in put

I have a table that has Color and Progress Interval Columns, I wanted to change the cell color in Progress Interval Column based on cell in Color Column. Example if Cell D2 says Green, E2 will be filled with Green.
Snap Shot From Table
Conditional Formatting
If Progress Interval is in column E, select the range from E2 to the last cell e.g. E20 and go to Format >> Conditional Formatting
choose Formula is and copy/paste the following formula:
=D2="Green"
Now click Format and click on the Patterns tab and choose the green color you need and change anything else (Font, Border). When done click OK.
Now you can click Add to add another condition and do the same for Yellow. When finished click OK.
If you want to exclude cells that contain no data use:
=AND(E2<>"",D2="Green")
Now only cells in the E column containing data will be hightlighted.

Change colour on row in one sheet if same value exists in second sheet

I have a sheet named Skruvdragare where cells B1-B500 contain serial numbers like: 123456789, 987654321 etc and a second sheet Låda 1 in which I will also put in some serial numbers (not necessarily the same numbers as in the Skruvdragare sheet).
If I put in a serial number, anywhere in Låda 1, which exists in Skruvdragare I want the row for this serial number to turn to red background and white text in the Skruvdragare sheet.
Use Conditional Formatting for this. But, as I've learned right now, the formula must not contain references to other sheets...so we work around this limitation by putting the formula into an auxiliary column in sheet2:
=NOT(ISERROR(MATCH($A1,sheet1!$A$1:$A$500,0)))
and the conditional format just contains the formula
=$D1
if the aux column was "D". Copy that format to as many cells you like (except for the aux column!).
Please Define Name of Workbook Scope for Låda 1, say OtherSheet:
Select the cell, range of cells, or nonadjacent selections that you want to name.
Click the Name box at the left end of the formula bar.
Name box
Type the name that you want to use to refer to your selection. Names can be up to 255 characters in length.
Press ENTER.
Select from Row1 to Row500 in Skruvdragare and HOME > Styles - Conditional Formatting, New Rule..., Use a formula to determine which cells to format and Format values where this formula is true::
=COUNTIF(OtherSheet,$B1)
Format..., select red fill white font, OK, OK.

How to conditional format a cell based on a date entered in an adjacent cell

I am setting up a Training Matrix spreadsheet, so I want a spreadsheet that highlights annual refresher training. Cells in column AO to be:
GREEN if today's date is within 330 days of the date in column AM
AMBER if today's date is between 330 and 365 days of the date in column AM
RED if today's date is greater than 365 of the date in column AM
and remain white if a date is entered in it.
From Comment:
the dates in column AM would be in the past
Step 1. Select entire column AO. With selected range go to Conditional Formatting->New Rule...
Step 2. Create new rule with "Use a formula to determine wich cell to format...", enter a formula =AND($AO1="",$AM1<>"",TODAY()-$AM1>365) and choose red format (by pressing Format button). Press OK
Step 3. Select New Rule
Step 4. Enter formula for new rule =AND($AO1="",$AM1<>"",TODAY()-$AM1>330,TODAY()-$AM1<=365) and select abmer format. Press OK
Step 5. Enter formula for new rule =AND($AO1="",$AM1<>"",TODAY()-$AM1<=330) and select green format. Press OK
RESULT
UNtested but please try:
where the individual rules in order as shown are:
=NOT(ISBLANK(AO1)) (image does not match)
=TODAY()-AM1>365
=TODAY()-AM1>330
=TODAY()-AM1<=330

Excel 2010 - Conditional formatting, color adjacent cells in same row

Is is possible in Excel 2010 to set a conditional formatting rule to highlight all not empty cells in a row when the cell in particular column has a particular value?
I have a report in which every row identify a day. I would like to colour in grey the rows relative to Saturday and Sunday. The day is stored in column C.
I know how to highlight cells in column C, but how can I easily extent the format of cell C to the adjacent not empty cells in the same row?
This is easy to do without a macro and without using INDIRECT function
Assuming you have data starting at row 2 and that the "day" in column C is a text value then do this:
Select whole range of data, e.g. A2:J100
apply in conditional formatting the formula that needs to apply to the first row, e.g.
=AND($C2="Saturday",A2<>"")
That will apply formatting to all cells in the range if col C of that row is "Saturday" and the cell itself is not blank. Note C2 needs a $ in front because it applies to C for the whole row A2 doesn't need $
If you want to apply to Saturday and Sunday the same type of formatting then use an OR, i.e.
=AND(OR($C2="Saturday",$C2="Sunday"),A2<>"")
....or if the column C entries are actual dates make that
=AND(WEEKDAY($C2,2)>5,$C2<>"",A2<>"")
See example workbook with that last CF formula demonstrated
Taking inspiration from John answer in this thread, I've used the "indirect" function on the conditional formatting.
Select Conditional Formatting
Select New Rule
Select "Use a Formula to determine which cells to format"
Enter the Formula, =WEEKDAY(INDIRECT("c"&ROW()))=1 # for Sundays
Enter the Format you want (text color, fill color, etc).
Select OK to save the new format
Open "Manage Rules" in Conditional Formatting
Select "This Worksheet" if you can't see your new rule.
In the "Applies to" box of your new rule, enter =$A$1:$J$35 (or however wide/long you want the conditional formatting to extend depending on your worksheet)
Do it again, this time inserting the Formula, =WEEKDAY(INDIRECT("c"&ROW()))=7 # for Saturdays
There is only an issue with this formula. When the cell in Column C is empty it will be read as 7, therefore the row will be formatted as if it's a Saturday. Do you know why?

Resources