Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default If Function and Dates

I am trying to create a function in a spreadsheet but not sure how to go
about it. I have a start date in A1 and and end date in B1. If column c1
falls between those dates, I want to have the cell in D1 enter the value of
1. If c2 does not fall between those dates, then I want it to enter the
value of 0. Can this be done?
--
Laura
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,118
Default If Function and Dates

With
A1: (a start date)
B1: (an end date)
C1: (a date)

This formula returns 1 if C1 is between A1 and B1, inclusive:
D1: =--(MEDIAN(A1:C1)=C1)

Is that something you can work with?
Post back if you have more questions.
--------------------------

Regards,

Ron
Microsoft MVP (Excel)
(XL2003, Win XP)


"Laura Logan" wrote in message
...
I am trying to create a function in a spreadsheet but not sure how to go
about it. I have a start date in A1 and and end date in B1. If column c1
falls between those dates, I want to have the cell in D1 enter the value
of
1. If c2 does not fall between those dates, then I want it to enter the
value of 0. Can this be done?
--
Laura




  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default If Function and Dates

Sorry, question should read:

I am trying to create a function in a spreadsheet but not sure how to go
about it. I have a start date in A1 and and end date in B1. If column c1
falls between those dates, I want to have the cell in D1 enter the value of
1. If c1 does not fall between those dates, then I want it to enter the
value of 0. Can this be done?
--
Laura


"Laura Logan" wrote:

I am trying to create a function in a spreadsheet but not sure how to go
about it. I have a start date in A1 and and end date in B1. If column c1
falls between those dates, I want to have the cell in D1 enter the value of
1. If c2 does not fall between those dates, then I want it to enter the
value of 0. Can this be done?
--
Laura

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default If Function and Dates

Thanks Ron. That did the trick.
--
Laura


"Ron Coderre" wrote:

With
A1: (a start date)
B1: (an end date)
C1: (a date)

This formula returns 1 if C1 is between A1 and B1, inclusive:
D1: =--(MEDIAN(A1:C1)=C1)

Is that something you can work with?
Post back if you have more questions.
--------------------------

Regards,

Ron
Microsoft MVP (Excel)
(XL2003, Win XP)


"Laura Logan" wrote in message
...
I am trying to create a function in a spreadsheet but not sure how to go
about it. I have a start date in A1 and and end date in B1. If column c1
falls between those dates, I want to have the cell in D1 enter the value
of
1. If c2 does not fall between those dates, then I want it to enter the
value of 0. Can this be done?
--
Laura





  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,091
Default If Function and Dates

Perhaps this is easier to understand rather than that obfuscated formula.

=IF(AND(C1=A1,C1<=B1),1,0)

Tyro

"Laura Logan" wrote in message
...
I am trying to create a function in a spreadsheet but not sure how to go
about it. I have a start date in A1 and and end date in B1. If column c1
falls between those dates, I want to have the cell in D1 enter the value
of
1. If c2 does not fall between those dates, then I want it to enter the
value of 0. Can this be done?
--
Laura





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default If Function and Dates

How about this:

=AND(C1=A1,C1<=B1)*1

Obfuscated enough ?

Pete

"Tyro" wrote in message
. net...
Perhaps this is easier to understand rather than that obfuscated formula.

=IF(AND(C1=A1,C1<=B1),1,0)

Tyro

"Laura Logan" wrote in message
...
I am trying to create a function in a spreadsheet but not sure how to go
about it. I have a start date in A1 and and end date in B1. If column
c1
falls between those dates, I want to have the cell in D1 enter the value
of
1. If c2 does not fall between those dates, then I want it to enter the
value of 0. Can this be done?
--
Laura





  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,091
Default If Function and Dates

Apply the KISS principle, just keep it simple

Tyro

"Pete_UK" wrote in message
...
How about this:

=AND(C1=A1,C1<=B1)*1

Obfuscated enough ?

Pete

"Tyro" wrote in message
. net...
Perhaps this is easier to understand rather than that obfuscated formula.

=IF(AND(C1=A1,C1<=B1),1,0)

Tyro

"Laura Logan" wrote in message
...
I am trying to create a function in a spreadsheet but not sure how to go
about it. I have a start date in A1 and and end date in B1. If column
c1
falls between those dates, I want to have the cell in D1 enter the value
of
1. If c2 does not fall between those dates, then I want it to enter the
value of 0. Can this be done?
--
Laura







  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,091
Default If Function and Dates

You have really no understanding of simple things. The more obfuscated it
is, the better for the learner.
I can give you obfuscated things that would blow your socks off. But to
whose benefit?

Tyro

"Pete_UK" wrote in message
...
How about this:

=AND(C1=A1,C1<=B1)*1

Obfuscated enough ?

Pete

"Tyro" wrote in message
. net...
Perhaps this is easier to understand rather than that obfuscated formula.

=IF(AND(C1=A1,C1<=B1),1,0)

Tyro

"Laura Logan" wrote in message
...
I am trying to create a function in a spreadsheet but not sure how to go
about it. I have a start date in A1 and and end date in B1. If column
c1
falls between those dates, I want to have the cell in D1 enter the value
of
1. If c2 does not fall between those dates, then I want it to enter the
value of 0. Can this be done?
--
Laura







  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default If Function and Dates

Well, the OP here thanked Ron for his formula, so presumably she
understood it in the end. Sometimes it is better to stretch knowledge
in order for the learner to gain a better understanding of the
solution.

Pete

On Mar 12, 12:20*am, "Tyro" wrote:
You have really no understanding of simple things. The more obfuscated it
is, the better for the learner.
I can give you obfuscated things that would blow your socks off. But to
whose benefit?

Tyro

"Pete_UK" wrote in message

...



How about this:


=AND(C1=A1,C1<=B1)*1


Obfuscated enough ?


Pete


"Tyro" wrote in message
.net...
Perhaps this is easier to understand rather than that obfuscated formula.


=IF(AND(C1=A1,C1<=B1),1,0)


Tyro


"Laura Logan" wrote in message
...
I am trying to create a function in a spreadsheet but not sure how to go
about it. *I have a start date in A1 and and end date in B1. *If column
c1
falls between those dates, I want to have the cell in D1 enter the value
of
1. *If c2 does not fall between those dates, then I want it to enter the
value of 0. *Can this be done?
--
Laura- Hide quoted text -


- Show quoted text -


  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,091
Default If Function and Dates

I disagree entirely. The OP needs to learn the simple things, complicated
(obfuscation) will come with time.
After 44 years of computer programming, I truly believe in keeping it
simple.
I can obfuscate to the point that most programmers will say what is this
that works?

Tyro

"Pete_UK" wrote in message
...
Well, the OP here thanked Ron for his formula, so presumably she
understood it in the end. Sometimes it is better to stretch knowledge
in order for the learner to gain a better understanding of the
solution.

Pete

On Mar 12, 12:20 am, "Tyro" wrote:
You have really no understanding of simple things. The more obfuscated it
is, the better for the learner.
I can give you obfuscated things that would blow your socks off. But to
whose benefit?

Tyro

"Pete_UK" wrote in message

...



How about this:


=AND(C1=A1,C1<=B1)*1


Obfuscated enough ?


Pete


"Tyro" wrote in message
.net...
Perhaps this is easier to understand rather than that obfuscated
formula.


=IF(AND(C1=A1,C1<=B1),1,0)


Tyro


"Laura Logan" wrote in message
...
I am trying to create a function in a spreadsheet but not sure how to
go
about it. I have a start date in A1 and and end date in B1. If column
c1
falls between those dates, I want to have the cell in D1 enter the
value
of
1. If c2 does not fall between those dates, then I want it to enter
the
value of 0. Can this be done?
--
Laura- Hide quoted text -


- Show quoted text -





  #11   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,345
Default If Function and Dates

After 44 years of computer programming,

Your apparent need to keep telling us how long you have been in computing
makes you sound very under confident. I've been driving for 49 years - but
it doesn't make me Lewis Hamilton.

--
Regards,

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"Tyro" wrote in message
. net...
I disagree entirely. The OP needs to learn the simple things, complicated
(obfuscation) will come with time.
After 44 years of computer programming, I truly believe in keeping it
simple.
I can obfuscate to the point that most programmers will say what is this
that works?

Tyro

"Pete_UK" wrote in message
...
Well, the OP here thanked Ron for his formula, so presumably she
understood it in the end. Sometimes it is better to stretch knowledge
in order for the learner to gain a better understanding of the
solution.

Pete

On Mar 12, 12:20 am, "Tyro" wrote:
You have really no understanding of simple things. The more obfuscated it
is, the better for the learner.
I can give you obfuscated things that would blow your socks off. But to
whose benefit?

Tyro

"Pete_UK" wrote in message

...



How about this:


=AND(C1=A1,C1<=B1)*1


Obfuscated enough ?


Pete


"Tyro" wrote in message
.net...
Perhaps this is easier to understand rather than that obfuscated
formula.


=IF(AND(C1=A1,C1<=B1),1,0)


Tyro


"Laura Logan" wrote in message
...
I am trying to create a function in a spreadsheet but not sure how to
go
about it. I have a start date in A1 and and end date in B1. If column
c1
falls between those dates, I want to have the cell in D1 enter the
value
of
1. If c2 does not fall between those dates, then I want it to enter
the
value of 0. Can this be done?
--
Laura- Hide quoted text -


- Show quoted text -







  #12   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,118
Default If Function and Dates

Hey! How'bout them Red Sox, eh?

Respectfully,

Ron
Microsoft MVP (Excel)
(XL2003, Win XP)



"Sandy Mann" wrote in message
...
After 44 years of computer programming,


Your apparent need to keep telling us how long you have been in computing
makes you sound very under confident. I've been driving for 49 years -
but
it doesn't make me Lewis Hamilton.

--
Regards,

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"Tyro" wrote in message
. net...
I disagree entirely. The OP needs to learn the simple things, complicated
(obfuscation) will come with time.
After 44 years of computer programming, I truly believe in keeping it
simple.
I can obfuscate to the point that most programmers will say what is this
that works?

Tyro

"Pete_UK" wrote in message
...
Well, the OP here thanked Ron for his formula, so presumably she
understood it in the end. Sometimes it is better to stretch knowledge
in order for the learner to gain a better understanding of the
solution.

Pete

On Mar 12, 12:20 am, "Tyro" wrote:
You have really no understanding of simple things. The more obfuscated
it
is, the better for the learner.
I can give you obfuscated things that would blow your socks off. But to
whose benefit?

Tyro

"Pete_UK" wrote in message

...



How about this:

=AND(C1=A1,C1<=B1)*1

Obfuscated enough ?

Pete

"Tyro" wrote in message
.net...
Perhaps this is easier to understand rather than that obfuscated
formula.

=IF(AND(C1=A1,C1<=B1),1,0)

Tyro

"Laura Logan" wrote in message
...
I am trying to create a function in a spreadsheet but not sure how to
go
about it. I have a start date in A1 and and end date in B1. If
column
c1
falls between those dates, I want to have the cell in D1 enter the
value
of
1. If c2 does not fall between those dates, then I want it to enter
the
value of 0. Can this be done?
--
Laura- Hide quoted text -

- Show quoted text -









  #13   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,345
Default If Function and Dates

You're talking to Limey here Ron - I'm afraid that that goes right over my
head.

--
Regards,

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"Ron Coderre" wrote in message
...
Hey! How'bout them Red Sox, eh?

Respectfully,

Ron
Microsoft MVP (Excel)
(XL2003, Win XP)



"Sandy Mann" wrote in message
...
After 44 years of computer programming,


Your apparent need to keep telling us how long you have been in computing
makes you sound very under confident. I've been driving for 49 years -
but
it doesn't make me Lewis Hamilton.

--
Regards,

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"Tyro" wrote in message
. net...
I disagree entirely. The OP needs to learn the simple things, complicated
(obfuscation) will come with time.
After 44 years of computer programming, I truly believe in keeping it
simple.
I can obfuscate to the point that most programmers will say what is this
that works?

Tyro

"Pete_UK" wrote in message
...
Well, the OP here thanked Ron for his formula, so presumably she
understood it in the end. Sometimes it is better to stretch knowledge
in order for the learner to gain a better understanding of the
solution.

Pete

On Mar 12, 12:20 am, "Tyro" wrote:
You have really no understanding of simple things. The more obfuscated
it
is, the better for the learner.
I can give you obfuscated things that would blow your socks off. But to
whose benefit?

Tyro

"Pete_UK" wrote in message

...



How about this:

=AND(C1=A1,C1<=B1)*1

Obfuscated enough ?

Pete

"Tyro" wrote in message
.net...
Perhaps this is easier to understand rather than that obfuscated
formula.

=IF(AND(C1=A1,C1<=B1),1,0)

Tyro

"Laura Logan" wrote in
message
...
I am trying to create a function in a spreadsheet but not sure how
to
go
about it. I have a start date in A1 and and end date in B1. If
column
c1
falls between those dates, I want to have the cell in D1 enter the
value
of
1. If c2 does not fall between those dates, then I want it to enter
the
value of 0. Can this be done?
--
Laura- Hide quoted text -

- Show quoted text -











  #14   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default If Function and Dates

Unless he means Liverpool last night in the San Siro !! <bg

Pete

On Mar 12, 11:54*am, "Sandy Mann" wrote:
You're talking to Limey here Ron - I'm afraid that that goes right over my
head.

--
Regards,

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk

"Ron Coderre" wrote in message

...



Hey! How'bout them Red Sox, eh?


Respectfully,


Ron
Microsoft MVP (Excel)
(XL2003, Win XP)


"Sandy Mann" wrote in message
...
After 44 years of computer programming,


Your apparent need to keep telling us how long you have been in computing
makes you sound very under confident. *I've been driving for 49 years -
but
it doesn't make me Lewis Hamilton.


--
Regards,


Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings



Replace @mailinator.com with @tiscali.co.uk


"Tyro" wrote in message
y.net...
I disagree entirely. The OP needs to learn the simple things, complicated
(obfuscation) will come with time.
After 44 years of computer programming, I truly believe in keeping it
simple.
I can obfuscate to the point that most programmers will say what is this
that works?


Tyro


"Pete_UK" wrote in message
....
Well, the OP here thanked Ron for his formula, so presumably she
understood it in the end. Sometimes it is better to stretch knowledge
in order for the learner to gain a better understanding of the
solution.


Pete


On Mar 12, 12:20 am, "Tyro" wrote:
You have really no understanding of simple things. The more obfuscated
it
is, the better for the learner.
I can give you obfuscated things that would blow your socks off. But to
whose benefit?


Tyro


"Pete_UK" wrote in message


.. .


How about this:


=AND(C1=A1,C1<=B1)*1


Obfuscated enough ?


Pete


"Tyro" wrote in message
.net...
Perhaps this is easier to understand rather than that obfuscated
formula.


=IF(AND(C1=A1,C1<=B1),1,0)


Tyro


"Laura Logan" wrote in
message
...
I am trying to create a function in a spreadsheet but not sure how
to
go
about it. I have a start date in A1 and and end date in B1. If
column
c1
falls between those dates, I want to have the cell in D1 enter the
value
of
1. If c2 does not fall between those dates, then I want it to enter
the
value of 0. Can this be done?
--
Laura- Hide quoted text -


- Show quoted text -- Hide quoted text -


- Show quoted text -


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
If Between Dates Function - please help Mitchell_Collen via OfficeKB.com Excel Worksheet Functions 5 June 14th 07 11:51 PM
IF function and DATES Excel_Oz Excel Worksheet Functions 6 February 21st 07 04:17 AM
IF function using dates ? barnsey11 Excel Worksheet Functions 2 January 15th 06 04:01 PM
Comparing dates in an IF function Paula Excel Worksheet Functions 3 January 12th 05 02:21 PM
if function with dates Brad Excel Discussion (Misc queries) 1 January 10th 05 10:49 PM


All times are GMT +1. The time now is 02:49 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"