ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   IF value is in range (https://www.excelbanter.com/excel-discussion-misc-queries/225436-if-value-range.html)

Kirsty

IF value is in range
 
I am trying to write a formula or macro that returns a result if a value is
in a range.
I can write the lookup fine, but i am getting data errors if there is no
value.

What i want to do is put an IF statement in that states
IF(date,is in range,then,0)

Can anyone help

Fred Smith[_4_]

IF value is in range
 
Something like this:

=if(and(a1date(2009,1,1),a1<date(2009,2,1)),"in range","out of range")

?

Regards,
Fred.

"Kirsty" wrote in message
...
I am trying to write a formula or macro that returns a result if a value is
in a range.
I can write the lookup fine, but i am getting data errors if there is no
value.

What i want to do is put an IF statement in that states
IF(date,is in range,then,0)

Can anyone help



T. Valko

IF value is in range
 
Hmmm....

returns a result if a value is in a range.


Returns what result?

Try something like this:

=IF(COUNTIF(A1:A10,X1),"Yes, it's there","No, it's not there")

--
Biff
Microsoft Excel MVP


"Kirsty" wrote in message
...
I am trying to write a formula or macro that returns a result if a value is
in a range.
I can write the lookup fine, but i am getting data errors if there is no
value.

What i want to do is put an IF statement in that states
IF(date,is in range,then,0)

Can anyone help





All times are GMT +1. The time now is 07:27 PM.

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