Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22
Default Counting Days with variables

I have three columns. A, B, & C.....

Formula will be in column C.

Column A might have a date, Column B might have a date.

I need a formula tocount how many days.......

a) if column A is blank then I need column C blank
b) if column A has a date, then I need the number of days from A to today
unless there is a date in B, then I will need the number of days between
Column A & B.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Counting Days with variables

=IF(A1="","",IF(B1="",TODAY()-A1,B1-A1))
--
Gary''s Student - gsnu200820
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22
Default Counting Days with variables

Fantastic, works like a charm.

Thanks heaps

"Gary''s Student" wrote:

=IF(A1="","",IF(B1="",TODAY()-A1,B1-A1))
--
Gary''s Student - gsnu200820

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
counting ranges with multiple variables GAIDEN Excel Worksheet Functions 2 October 3rd 08 04:26 PM
counting the number of two different variables Nick Excel Discussion (Misc queries) 1 July 2nd 08 07:35 PM
Counting values for variables in separate columns MMcQ Excel Discussion (Misc queries) 6 August 30th 06 12:28 PM
Counting multiple variables returns #VALUE was Excel Discussion (Misc queries) 1 August 12th 05 02:13 AM
counting based ona number of variables. vipa2000 Excel Worksheet Functions 11 July 29th 05 04:08 PM


All times are GMT +1. The time now is 12:26 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"