![]() |
Test if a value is in a range of values
I am trying to write a formula that tests a cell value to see if it matches
values in a range of values and returns either true or false. Any help would be greatly appreciated. Josh |
Test if a value is in a range of values
With the cell to test in A1 and the range to test if it matches in B1:B50,
=IF(COUNTIF(B1:B50,A1)0,TRUE,FALSE) Regards, Aln. "jfrick" wrote in message ... I am trying to write a formula that tests a cell value to see if it matches values in a range of values and returns either true or false. Any help would be greatly appreciated. Josh |
Test if a value is in a range of values
Try this:
=Countif(A1:A100,25)0 -- HTH, RD --------------------------------------------------------------------------- Please keep all correspondence within the NewsGroup, so all may benefit ! --------------------------------------------------------------------------- "jfrick" wrote in message ... I am trying to write a formula that tests a cell value to see if it matches values in a range of values and returns either true or false. Any help would be greatly appreciated. Josh |
Test if a value is in a range of values
Hi Josh,
=AND(A1=50,A1<=100) This returns TRUE if the value of A1 lies between 50 and 100, Otherwise it returns FALSE. Cheers, Shane "jfrick" wrote in message ... I am trying to write a formula that tests a cell value to see if it matches values in a range of values and returns either true or false. Any help would be greatly appreciated. Josh |
Test if a value is in a range of values
In that case you don't need the IF(...,TRUE,FALSE), Alan.
The condition automatically returns a Boolean, so you'd get the same result from =COUNTIF(B1:B50,A1)0 -- David Biddulph "Alan" wrote in message ... With the cell to test in A1 and the range to test if it matches in B1:B50, =IF(COUNTIF(B1:B50,A1)0,TRUE,FALSE) Regards, Aln. "jfrick" wrote in message ... I am trying to write a formula that tests a cell value to see if it matches values in a range of values and returns either true or false. Any help would be greatly appreciated. Josh |
Test if a value is in a range of values
Alan:
Thanks this works great. Thanks everyone for your suggestions. Josh "Alan" wrote: With the cell to test in A1 and the range to test if it matches in B1:B50, =IF(COUNTIF(B1:B50,A1)0,TRUE,FALSE) Regards, Aln. "jfrick" wrote in message ... I am trying to write a formula that tests a cell value to see if it matches values in a range of values and returns either true or false. Any help would be greatly appreciated. Josh |
Test if a value is in a range of values
That's good, but what David said is correct, it can be shortened to
=COUNTIF(B1:B50,A1)0 Regards, Aln. "jfrick" wrote in message ... Alan: Thanks this works great. Thanks everyone for your suggestions. Josh "Alan" wrote: With the cell to test in A1 and the range to test if it matches in B1:B50, =IF(COUNTIF(B1:B50,A1)0,TRUE,FALSE) Regards, Aln. "jfrick" wrote in message ... I am trying to write a formula that tests a cell value to see if it matches values in a range of values and returns either true or false. Any help would be greatly appreciated. Josh |
Test if a value is in a range of values
Am I missing something... isn't that what he posted?
Rick "Alan" wrote in message ... That's good, but what David said is correct, it can be shortened to =COUNTIF(B1:B50,A1)0 Regards, Aln. "jfrick" wrote in message ... Alan: Thanks this works great. Thanks everyone for your suggestions. Josh "Alan" wrote: With the cell to test in A1 and the range to test if it matches in B1:B50, =IF(COUNTIF(B1:B50,A1)0,TRUE,FALSE) Regards, Aln. "jfrick" wrote in message ... I am trying to write a formula that tests a cell value to see if it matches values in a range of values and returns either true or false. Any help would be greatly appreciated. Josh |
Test if a value is in a range of values
Really? ... no kidding!<bg
-- Regards, RD --------------------------------------------------------------------------- Please keep all correspondence within the NewsGroup, so all may benefit ! --------------------------------------------------------------------------- "Alan" wrote in message ... That's good, but what David said is correct, it can be shortened to =COUNTIF(B1:B50,A1)0 Regards, Aln. "jfrick" wrote in message ... Alan: Thanks this works great. Thanks everyone for your suggestions. Josh "Alan" wrote: With the cell to test in A1 and the range to test if it matches in B1:B50, =IF(COUNTIF(B1:B50,A1)0,TRUE,FALSE) Regards, Aln. "jfrick" wrote in message ... I am trying to write a formula that tests a cell value to see if it matches values in a range of values and returns either true or false. Any help would be greatly appreciated. Josh |
Test if a value is in a range of values
I was just acknowledging that I made a mistake,
Sorry, "Rick Rothstein (MVP - VB)" wrote in message ... Am I missing something... isn't that what he posted? Rick "Alan" wrote in message ... That's good, but what David said is correct, it can be shortened to =COUNTIF(B1:B50,A1)0 Regards, Aln. "jfrick" wrote in message ... Alan: Thanks this works great. Thanks everyone for your suggestions. Josh "Alan" wrote: With the cell to test in A1 and the range to test if it matches in B1:B50, =IF(COUNTIF(B1:B50,A1)0,TRUE,FALSE) Regards, Aln. "jfrick" wrote in message ... I am trying to write a formula that tests a cell value to see if it matches values in a range of values and returns either true or false. Any help would be greatly appreciated. Josh |
All times are GMT +1. The time now is 03:02 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com