ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Falling within a range (https://www.excelbanter.com/excel-discussion-misc-queries/76991-falling-within-range.html)

ben simpson

Falling within a range
 
What would be the best way to create a formula to say:

If a A1 is = than A2, the result is XX, and if not ZZ ,and if at the
same time A1 is < A3, the result is YY, or the same ZZ.

I'm trying to check if a number falls within a range of numbers, it gives me
a result, and the result remains until it no longer falls within the same
range.

Does any of this make any sense? Thank you for looking in....Ben

Nick Hodge

Falling within a range
 
Ben

I think you want something like

=IF(AND(A1=A2,A1<A3),"YY",IF(A1=A2,"XX","ZZ"))

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
www.nickhodge.co.uk
HIS


"ben simpson" wrote in message
...
What would be the best way to create a formula to say:

If a A1 is = than A2, the result is XX, and if not ZZ ,and if at the
same time A1 is < A3, the result is YY, or the same ZZ.

I'm trying to check if a number falls within a range of numbers, it gives
me
a result, and the result remains until it no longer falls within the same
range.

Does any of this make any sense? Thank you for looking in....Ben




ben simpson

Falling within a range
 
Thank you very much Nick. Exactly what i was looking for. Sometimes one can
look at a problem for too long and not realize the logic.

"Nick Hodge" wrote:

Ben

I think you want something like

=IF(AND(A1=A2,A1<A3),"YY",IF(A1=A2,"XX","ZZ"))

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
www.nickhodge.co.uk
HIS


"ben simpson" wrote in message
...
What would be the best way to create a formula to say:

If a A1 is = than A2, the result is XX, and if not ZZ ,and if at the
same time A1 is < A3, the result is YY, or the same ZZ.

I'm trying to check if a number falls within a range of numbers, it gives
me
a result, and the result remains until it no longer falls within the same
range.

Does any of this make any sense? Thank you for looking in....Ben






All times are GMT +1. The time now is 09:35 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com