Conditional Formatting based on 2 sets of criteria?

Ian1976

Board Regular
Joined
Feb 4, 2016
Messages
137
Office Version
  1. 365
Platform
  1. Windows
Hi,

I'm using this formula...

=IFERROR(VLOOKUP(AG3,A2:T89,200)," ")

Is there a way to also check if the text in AG3 starts with 319 and the result returned from A2:T89 was >499 then colour the result if conditons are met in red?

Thanks
 
I don't understand what you are asking.
No part of your formula affects the range Z19:AU28
 
Upvote 0

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Hi Fluff,

Sorry it's complicated (to me, anyway!) this is the conditional formula i'm using in cell AG19, =AND(LEFT(AG3,3)="319",IFERROR(VLOOKUP(AG3,A2:T89,20,0),0)<=-300)

it checks AG3 to see if it starts with 319 then if it does it checks if the results in the bottom table are <= -400 and if thats true it colours the cell pink at the moment, i was going to just use a simple conditional formula but have already used one for all the other cells starting with 350 if they are <= -800 they turn red!

do you need anymore info?

I'm trying to upload a screen shot of my sheet but im struggling at the moment!

Thanks!

wZ6CTxoudDAAAAAElFTkSuQmCC
 
Last edited:
Upvote 0
I'm now even more confused.
Please explain EXACTLY what you are trying todo.
For instance are you tying to colour an individual cell, or entire rows?
Should every cell be looking at AG3, or does that need to be dynamic?
 
Upvote 0
https://1drv.ms/x/s!Aszg_mMOoSFEgRp_a_jfxg505iGP

Heres the file im working on, hopefully my explanation will now make more sense, i am trying to colour in every cell that starts with 319 when the hours get below -400, ive used conditional formatting to get the 350's to show in red when they get below -800!

so if the top table has a cell with 319 in it and the coresponding hours in the table below are -400 then i'd like it to be hightlighted in red!

thanks
Ian
 
Last edited:
Upvote 0
Ok, select Z19:AU28 & use this formula
=AND(LEFT(Z3,3)="319", Z19<=-400)
 
Upvote 0
Thanks Fluff, works perfectly! Can you explain/break it down for me when you have time?

Thanks
 
Upvote 0
It's simply saying if a cell in the top section starts with 319 & the corresponding cell (ie 16 rows below) is less than or equal to -400 then highlight it
 
Upvote 0
Hi Fluff,

HNY! :)

https://1drv.ms/x/s!Aszg_mMOoSFEgRyt-qUa9uRsOkZG

Could you have a look at my spreadsheet and tell me if there is a way of keeping the formulas in the same order as the rest of the data after sorting it using the buttons?

I had a play with changing the formulas to absolute but can't figure out where I'm going wrong?

Thanks
Ian
 
Upvote 0

Forum statistics

Threads
1,216,028
Messages
6,128,395
Members
449,446
Latest member
CodeCybear

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