# 2 last values with conditional formatting

#### ruiviagem

##### New Member
Hello everybody.
I need your help again !!!
Let's say that I need a conditional formatting for the (last two values) per line, when the last is less than 75% in relation to the penultimate.
I used 2 columns (maybe not even necessary, but I couldn't get better to give me the last two values when they are in my reference values (<= 75%) using the formula = IF (\$ AG6 * 75% < = \$ AH6; ""; 1).
I couldn't get better than the example in the photo.
Thank you in advance for a possible help.
Health for all

### Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December

#### etaf

##### Well-known Member
you have also posted on another forum, always worth just mentioning that
Just that someone here may do a lot of work, only to find it was solved hours ago on the other forum
Are the Last 2 values always in the Same 2 columns ?
If so then you can use a simple conditional formatting formula
which is as posted
\$ AH6 * 75% < = \$ AG6

#### etaf

##### Well-known Member
Is this the expected result - i have used G & H instead of AG & AH for simplicity, for this i have also just as example added the formula in J & K , but not needed

cond-frmt-etaf.xlsx
ABCDEFGHIJK
1H * 75%H<=J
2\$ AH6 * 75% < = \$ AG610.50.375TRUE
3I have used H & G columns as an example232.25FALSE
4332.25TRUE
5464.5FALSE
654.93.675TRUE
Sheet1
Cell Formulas
RangeFormula
J2:J6J2=H2*0.75
K2:K6K2=J2<=G2
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A2:H6Expression=\$H2*0.75<=\$G2textNO

Last edited:

#### ruiviagem

##### New Member
Hi,
"Are the Last 2 values always in the Same 2 columns?"
No, the values are variable to the cell!
When I apply the formula (= IF (\$ AG6 * 75% <= \$ AH6; ""; 1)) it doesn't give me the desired result: ()

#### Attachments

65.9 KB · Views: 4

#### Fluff

##### MrExcel MVP, Moderator

Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Cross posted at: link in post#2
If you have posted the question at more places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.

#### ruiviagem

##### New Member
Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Cross posted at: link in post#2
If you have posted the question at more places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
You are absolutely right.
Thanks

#### ruiviagem

##### New Member
Is this the expected result - i have used G & H instead of AG & AH for simplicity, for this i have also just as example added the formula in J & K , but not needed

cond-frmt-etaf.xlsx
ABCDEFGHIJK
1H * 75%H<=J
2\$ AH6 * 75% < = \$ AG610.50.375TRUE
3I have used H & G columns as an example232.25FALSE
4332.25TRUE
5464.5FALSE
654.93.675TRUE
Sheet1
Cell Formulas
RangeFormula
J2:J6J2=H2*0.75
K2:K6K2=J2<=G2
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A2:H6Expression=\$H2*0.75<=\$G2textNO
Thanks

Replies
20
Views
1K
Replies
4
Views
273
Replies
3
Views
318
Replies
8
Views
610
Replies
7
Views
177

1,140,993
Messages
5,703,611
Members
421,305
Latest member
ambuj Thakur

### 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.

### Which adblocker are you using?

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

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