ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   IF Statement (https://www.excelbanter.com/excel-discussion-misc-queries/95686-if-statement.html)

s2m via OfficeKB.com

IF Statement
 
I work with a daily extract that has a 2 columns, which contains
both a Plan Start date(Z) and Actual Start date(AA). I am trying to build an
IF statement that will look at the Plan Start date and find if it has an
Actual Date.
I can run a pivot but I need to show it like this.

The problem I am having is that it counts any corresponding date in the
Actual column. I only want it to show if the Plan dates has been actually
started. I don't want to see any Actual numbers if there is not an Plan
number.


3/1 3/2 3/3 3/4 3/5 3/6 3/7 3/8
Plan 2 0 0 0 4 0 0 0
Actual 2 0 0 2 6 0 0 4

--
Message posted via http://www.officekb.com

Toppers

IF Statement
 
If I understood correctly, try this:

To get number of plans for a given date:

=SUMPRODUCT(--(Sheet3!$A$2:$A$21=Sheet2!$B1))

B1 is the date to be matched and Sheet3 column A are your plan dates, column
B your actual dates (in your case Y and ZZ)

To get equivalent actuals:

=IF(SUMPRODUCT(--(Sheet3!$A$2:$A$21=$B1),--(Sheet3!$B$2:$B$21=B1))<0,SUMPRODUCT(--(Sheet3!$A$2:$A$21=$B1),--(Sheet3!$B$2:$B$21=$B1)),"")

If I have misunderstood, then delete!


"s2m via OfficeKB.com" wrote:

I work with a daily extract that has a 2 columns, which contains
both a Plan Start date(Z) and Actual Start date(AA). I am trying to build an
IF statement that will look at the Plan Start date and find if it has an
Actual Date.
I can run a pivot but I need to show it like this.

The problem I am having is that it counts any corresponding date in the
Actual column. I only want it to show if the Plan dates has been actually
started. I don't want to see any Actual numbers if there is not an Plan
number.


3/1 3/2 3/3 3/4 3/5 3/6 3/7 3/8
Plan 2 0 0 0 4 0 0 0
Actual 2 0 0 2 6 0 0 4

--
Message posted via http://www.officekb.com



All times are GMT +1. The time now is 09:00 PM.

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