A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Need a Function



 
 
Thread Tools Display Modes
  #1  
Old September 22nd, 2008, 12:30 PM posted to microsoft.public.excel.worksheet.functions
akemeny
external usenet poster
 
Posts: 29
Default Need a Function

I currently have the following function calculating:

=IF(OR(AA7="",AD7""),"",TODAY()-(AA7+65))

AA7 and AD7 are date columns. The column they calculate in is AC7. So if
AA7 is zero then AC7 is zero. If AA7 has a date then AC7 should equal
AA7+65-the current date. But if AD7 has a date then AC7 should equal AD7-AA7
instead of calculating from the first portion.

With the current function its only placing a zero when AD7 has a date. How
can I modify the current function so that I also calculates correctly??
  #2  
Old September 22nd, 2008, 12:40 PM posted to microsoft.public.excel.worksheet.functions
Ashish Mathur[_2_]
external usenet poster
 
Posts: 1,764
Default Need a Function

Hi,

Try this =if(AA7="","",TODAY()-(AA7+65),if(AD7="","",(AD7-AA7)))

--
Regards,

Ashsih Mathur
Microsoft Excel MVP
www.ashishmathur.com

"akemeny" wrote in message
...
I currently have the following function calculating:

=IF(OR(AA7="",AD7""),"",TODAY()-(AA7+65))

AA7 and AD7 are date columns. The column they calculate in is AC7. So if
AA7 is zero then AC7 is zero. If AA7 has a date then AC7 should equal
AA7+65-the current date. But if AD7 has a date then AC7 should equal
AD7-AA7
instead of calculating from the first portion.

With the current function its only placing a zero when AD7 has a date.
How
can I modify the current function so that I also calculates correctly??

  #3  
Old September 22nd, 2008, 12:47 PM posted to microsoft.public.excel.worksheet.functions
akemeny
external usenet poster
 
Posts: 29
Default Need a Function

It didn't work. Excel stated that the formula had too many arguements for
the function.

"Ashish Mathur" wrote:

Hi,

Try this =if(AA7="","",TODAY()-(AA7+65),if(AD7="","",(AD7-AA7)))

--
Regards,

Ashsih Mathur
Microsoft Excel MVP
www.ashishmathur.com

"akemeny" wrote in message
...
I currently have the following function calculating:

=IF(OR(AA7="",AD7""),"",TODAY()-(AA7+65))

AA7 and AD7 are date columns. The column they calculate in is AC7. So if
AA7 is zero then AC7 is zero. If AA7 has a date then AC7 should equal
AA7+65-the current date. But if AD7 has a date then AC7 should equal
AD7-AA7
instead of calculating from the first portion.

With the current function its only placing a zero when AD7 has a date.
How
can I modify the current function so that I also calculates correctly??

  #4  
Old September 22nd, 2008, 12:52 PM posted to microsoft.public.excel.worksheet.functions
Ashish Mathur[_2_]
external usenet poster
 
Posts: 1,764
Default Need a Function

Hi,

Sorry about that. Hope this helps.

if(AA7"",TODAY()-(AA7+65),if(AD7"",AD7-AA7,""))

--
Regards,

Ashsih Mathur
Microsoft Excel MVP
www.ashishmathur.com

"Ashish Mathur" wrote in message
...
Hi,

Try this =if(AA7="","",TODAY()-(AA7+65),if(AD7="","",(AD7-AA7)))

--
Regards,

Ashsih Mathur
Microsoft Excel MVP
www.ashishmathur.com

"akemeny" wrote in message
...
I currently have the following function calculating:

=IF(OR(AA7="",AD7""),"",TODAY()-(AA7+65))

AA7 and AD7 are date columns. The column they calculate in is AC7. So
if
AA7 is zero then AC7 is zero. If AA7 has a date then AC7 should equal
AA7+65-the current date. But if AD7 has a date then AC7 should equal
AD7-AA7
instead of calculating from the first portion.

With the current function its only placing a zero when AD7 has a date.
How
can I modify the current function so that I also calculates correctly??

  #5  
Old September 22nd, 2008, 01:08 PM posted to microsoft.public.excel.worksheet.functions
akemeny
external usenet poster
 
Posts: 29
Default Need a Function

That one didn't return an error, but it only calculates the first portion
regarding Column AA. I think it needs an or option because the way I can
explain it is:

if AA7 equals zero then AC7 equals zero, but if AA7 equals a date then AC7
equals Today minus AA7 plus 65. However, if AD7 equals a date then the
previous formula no longer calculates, instead AC7 would now equal AD7 minus
AA7.

"Ashish Mathur" wrote:

Hi,

Sorry about that. Hope this helps.

if(AA7"",TODAY()-(AA7+65),if(AD7"",AD7-AA7,""))

--
Regards,

Ashsih Mathur
Microsoft Excel MVP
www.ashishmathur.com

"Ashish Mathur" wrote in message
...
Hi,

Try this =if(AA7="","",TODAY()-(AA7+65),if(AD7="","",(AD7-AA7)))

--
Regards,

Ashsih Mathur
Microsoft Excel MVP
www.ashishmathur.com

"akemeny" wrote in message
...
I currently have the following function calculating:

=IF(OR(AA7="",AD7""),"",TODAY()-(AA7+65))

AA7 and AD7 are date columns. The column they calculate in is AC7. So
if
AA7 is zero then AC7 is zero. If AA7 has a date then AC7 should equal
AA7+65-the current date. But if AD7 has a date then AC7 should equal
AD7-AA7
instead of calculating from the first portion.

With the current function its only placing a zero when AD7 has a date.
How
can I modify the current function so that I also calculates correctly??

  #6  
Old September 22nd, 2008, 01:20 PM posted to microsoft.public.excel.worksheet.functions
Ashish Mathur[_2_]
external usenet poster
 
Posts: 1,764
Default Need a Function


if(and(AA7"",AD7=""),TODAY()-(AA7+65),if(and(AD7"",AD7""),AD7-AA7,0))

Hope this helps.

--
Regards,

Ashsih Mathur
Microsoft Excel MVP
www.ashishmathur.com

"akemeny" wrote in message
...
That one didn't return an error, but it only calculates the first portion
regarding Column AA. I think it needs an or option because the way I can
explain it is:

if AA7 equals zero then AC7 equals zero, but if AA7 equals a date then AC7
equals Today minus AA7 plus 65. However, if AD7 equals a date then the
previous formula no longer calculates, instead AC7 would now equal AD7
minus
AA7.

"Ashish Mathur" wrote:

Hi,

Sorry about that. Hope this helps.

if(AA7"",TODAY()-(AA7+65),if(AD7"",AD7-AA7,""))

--
Regards,

Ashsih Mathur
Microsoft Excel MVP
www.ashishmathur.com

"Ashish Mathur" wrote in message
...
Hi,

Try this =if(AA7="","",TODAY()-(AA7+65),if(AD7="","",(AD7-AA7)))

--
Regards,

Ashsih Mathur
Microsoft Excel MVP
www.ashishmathur.com

"akemeny" wrote in message
...
I currently have the following function calculating:

=IF(OR(AA7="",AD7""),"",TODAY()-(AA7+65))

AA7 and AD7 are date columns. The column they calculate in is AC7.
So
if
AA7 is zero then AC7 is zero. If AA7 has a date then AC7 should equal
AA7+65-the current date. But if AD7 has a date then AC7 should equal
AD7-AA7
instead of calculating from the first portion.

With the current function its only placing a zero when AD7 has a date.
How
can I modify the current function so that I also calculates
correctly??

  #7  
Old September 22nd, 2008, 01:26 PM posted to microsoft.public.excel.worksheet.functions
akemeny
external usenet poster
 
Posts: 29
Default Need a Function

That one worked perfectly.

Thanks!

"Ashish Mathur" wrote:


if(and(AA7"",AD7=""),TODAY()-(AA7+65),if(and(AD7"",AD7""),AD7-AA7,0))

Hope this helps.

--
Regards,

Ashsih Mathur
Microsoft Excel MVP
www.ashishmathur.com

"akemeny" wrote in message
...
That one didn't return an error, but it only calculates the first portion
regarding Column AA. I think it needs an or option because the way I can
explain it is:

if AA7 equals zero then AC7 equals zero, but if AA7 equals a date then AC7
equals Today minus AA7 plus 65. However, if AD7 equals a date then the
previous formula no longer calculates, instead AC7 would now equal AD7
minus
AA7.

"Ashish Mathur" wrote:

Hi,

Sorry about that. Hope this helps.

if(AA7"",TODAY()-(AA7+65),if(AD7"",AD7-AA7,""))

--
Regards,

Ashsih Mathur
Microsoft Excel MVP
www.ashishmathur.com

"Ashish Mathur" wrote in message
...
Hi,

Try this =if(AA7="","",TODAY()-(AA7+65),if(AD7="","",(AD7-AA7)))

--
Regards,

Ashsih Mathur
Microsoft Excel MVP
www.ashishmathur.com

"akemeny" wrote in message
...
I currently have the following function calculating:

=IF(OR(AA7="",AD7""),"",TODAY()-(AA7+65))

AA7 and AD7 are date columns. The column they calculate in is AC7.
So
if
AA7 is zero then AC7 is zero. If AA7 has a date then AC7 should equal
AA7+65-the current date. But if AD7 has a date then AC7 should equal
AD7-AA7
instead of calculating from the first portion.

With the current function its only placing a zero when AD7 has a date.
How
can I modify the current function so that I also calculates
correctly??

  #8  
Old September 22nd, 2008, 01:59 PM posted to microsoft.public.excel.worksheet.functions
Ashish Mathur[_2_]
external usenet poster
 
Posts: 1,764
Default Need a Function

Thank you for the feedback

--
Regards,

Ashsih Mathur
Microsoft Excel MVP
www.ashishmathur.com

"akemeny" wrote in message
...
That one worked perfectly.

Thanks!

"Ashish Mathur" wrote:


if(and(AA7"",AD7=""),TODAY()-(AA7+65),if(and(AD7"",AD7""),AD7-AA7,0))

Hope this helps.

--
Regards,

Ashsih Mathur
Microsoft Excel MVP
www.ashishmathur.com

"akemeny" wrote in message
...
That one didn't return an error, but it only calculates the first
portion
regarding Column AA. I think it needs an or option because the way I
can
explain it is:

if AA7 equals zero then AC7 equals zero, but if AA7 equals a date then
AC7
equals Today minus AA7 plus 65. However, if AD7 equals a date then the
previous formula no longer calculates, instead AC7 would now equal AD7
minus
AA7.

"Ashish Mathur" wrote:

Hi,

Sorry about that. Hope this helps.

if(AA7"",TODAY()-(AA7+65),if(AD7"",AD7-AA7,""))

--
Regards,

Ashsih Mathur
Microsoft Excel MVP
www.ashishmathur.com

"Ashish Mathur" wrote in message
...
Hi,

Try this =if(AA7="","",TODAY()-(AA7+65),if(AD7="","",(AD7-AA7)))

--
Regards,

Ashsih Mathur
Microsoft Excel MVP
www.ashishmathur.com

"akemeny" wrote in message
...
I currently have the following function calculating:

=IF(OR(AA7="",AD7""),"",TODAY()-(AA7+65))

AA7 and AD7 are date columns. The column they calculate in is AC7.
So
if
AA7 is zero then AC7 is zero. If AA7 has a date then AC7 should
equal
AA7+65-the current date. But if AD7 has a date then AC7 should
equal
AD7-AA7
instead of calculating from the first portion.

With the current function its only placing a zero when AD7 has a
date.
How
can I modify the current function so that I also calculates
correctly??

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:36 AM.


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