Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
martins
 
Posts: n/a
Default Choose Column in Calculation


I use the following formula to calculate the days between 2 dates –

=if(or(A1="",B1=""),0,B1-A1

How would the formula look if I wanted to add another column say ‘C1’ –
and then for the result to be calculated according to which cell had a
date entry e.g. either B1 or C1 - that would then minus A1?


--
martins
------------------------------------------------------------------------
martins's Profile: http://www.excelforum.com/member.php...o&userid=31616
View this thread: http://www.excelforum.com/showthread...hreadid=529222

  #2   Report Post  
Posted to microsoft.public.excel.newusers
B. R.Ramachandran
 
Posts: n/a
Default Choose Column in Calculation

Hi,

One possibility:

=IF(A1="",0,IF(AND(B1<"",C1<""),"Delete a date (Col B or Col
C)",IF(AND(B1="",C1=""),0,IF(B1="",C1-A1,B1-A1))))

Hope this helps,

Regards,
B. R. Ramachandran

"martins" wrote:


I use the following formula to calculate the days between 2 dates €“

=if(or(A1="",B1=""),0,B1-A1

How would the formula look if I wanted to add another column say €˜C1 €“
and then for the result to be calculated according to which cell had a
date entry e.g. either B1 or C1 - that would then minus A1?


--
martins
------------------------------------------------------------------------
martins's Profile: http://www.excelforum.com/member.php...o&userid=31616
View this thread: http://www.excelforum.com/showthread...hreadid=529222


  #3   Report Post  
Posted to microsoft.public.excel.newusers
Bob Phillips
 
Posts: n/a
Default Choose Column in Calculation

=IF(OR(A1="",AND(B1="",C1="")),0,MAX(B1,C1)-A1)

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"martins" wrote in
message ...

I use the following formula to calculate the days between 2 dates -

=if(or(A1="",B1=""),0,B1-A1

How would the formula look if I wanted to add another column say 'C1' -
and then for the result to be calculated according to which cell had a
date entry e.g. either B1 or C1 - that would then minus A1?


--
martins
------------------------------------------------------------------------
martins's Profile:

http://www.excelforum.com/member.php...o&userid=31616
View this thread: http://www.excelforum.com/showthread...hreadid=529222



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
How can I choose alternate rows in a column? pnair New Users to Excel 2 December 17th 05 05:16 AM
Arithmetical Mode of Criteria in Multiple Non-Adjacent columns Sam via OfficeKB.com Excel Worksheet Functions 4 July 14th 05 09:15 PM
Lookup Table Dilemma Karen Excel Worksheet Functions 2 June 10th 05 08:22 PM
How can I choose top two numbers in a column? Doug Excel Worksheet Functions 3 May 1st 05 11:04 PM
Return Count for LAST NonBlank Cell in each Row Sam via OfficeKB.com Excel Worksheet Functions 12 April 17th 05 10:36 PM


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

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

About Us

"It's about Microsoft Excel"