look up multiple values and counts to decide cell value

dappy

Board Regular
Joined
Apr 23, 2018
Messages
124
Office Version
  1. 2013
Platform
  1. Windows
Hi,

this is what i have in col R

=IF(J129=4,1,IF(COUNTIFS(A:A,A129,B:B,"<"&B129)<D129,"1","3"))

So this works fine if the the value in column J is 4, not a problem. but its the value in column B that's causing an issue and i'm totally stuck

Capture.JPG


if Col J is 4 then Col R will equal 1
if Col J is not 4 and the second number in b for that corridor is higher then i get 3 which is cool. the problem is if the value in J is 4 and the value in B is higher than the other corridor value in B then in R its 1 and not 3.

Confusing i know but is any egghead out there that can help?
 
You're now higher than any of my family in my christmas card list. you're spot on.

Thank you again and such a quick response. perfect.
 
Upvote 0

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Glad to help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,795
Messages
6,121,624
Members
449,041
Latest member
Postman24

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