Complex COUNTIFS / SUMPRODUCT Validating Dates Using 2 Ranges

Oct 4, 2013

I am trying to find out how many projects might be active as of a certain date.

I have a tab in excel that contains project data. For each project there is a "Start Date" and there might be an "End Date"

My question is, how do I count all the rows where the start date is Less than a given date and the end date is after a given date? The wrinkle is... if the end date is empty then obviously it should be counted as well (assuming the start date is still before the given date).

Here are the approaches I've used thus far:

=SUMPRODUCT(1*( AND(OR(RawMetrics!P:P > A2, RawMetrics!P:P = ""), RawMetrics!$O:$O < A2 )))
=COUNTIFS(RawMetrics!P:P,">"&Sheet1!A2,RawMetrics!O:O,"

View 4 Replies


ADVERTISEMENT

Attempting To Use Countifs / Sumproduct Where The Data Contains Dates

Jun 13, 2014

I"m attempting to generate a report to show the number of occurrences for a particular product within a calendar month.

Data is stored on the first sheet, output is populated on a separate sheet. Seems simple enough, but getting the "month" out of the date, whilst referring to another sheet seems to be the sticking point.

2014/03/24 14:34:17
Product1
2014/03/24 13:45:51
Product2

[Code]....

View 7 Replies View Related

Validating To And From Dates In Userform?

Feb 7, 2014

i am trying to make a user form with two msg boxes (To and From Date). In excel spreadsheet It was rather easy to bring a popup msg if they were invalid under some stated rules. see below a rationale of the rules where A3=From Date and B3 To Date and the desired outcome of is:

[Code] .......

So i wonder if it is possible to make a VBA code to validate these two dates? and bring a warning msg after keypress or after pressing submitcmd or any other available if available.

View 3 Replies View Related

Validating If Today Is Between Two Dates?

Mar 19, 2013

I'm trying to automate a field in my file that tells me whether or not a promo code is valid.

Col F2 = Promo Start Date (example: 1/1/13)
Col G2 = Promo End Date (example: 5/1/13)
Col H2 = Valid? (Yes/No) (example: "Yes")

What formula would I put in H2?

View 4 Replies View Related

Excel 2007 :: Complex SumIf / Sumproduct Formula?

Oct 11, 2011

I am trying to do a dynamic sumifs that allows the user to use data validation lists to select 5 items to query. This is the easy part.

The hard part is that the amounts range to sum goes across 6 weeks and I want the answer to also take account of another validation input which specifies up to what week the range should be.

I have done a simply if statement in row 8 that flags weeks relevant to input cell B6.

How do I do a formula in say cell A16 that does the sumifs and acknowledges that the user has requested a dynamic range to sum?

Sheet1ABCDEFGHIJK1RegimePost 20052TypeBudget<<<<- Dropdowns3Prod AreaLoans4ChannelRetail5Pro/ReReactive6Week18-May-1178Flags ->1110009Regime 2TypeProd AreaChannelPro/Re04-May-1111-May-1118-May-1125-May-1101-Jun-1108-Jun-1110Post 2005Budget Loans Retail Reactive 36942041320736540011Post 2005Budget Cards Retail Reactive 38423444021726636212Pre 2005Actual Mortgages Tele Proactive 35739840536923740113Pre 2005Actual Loans Direct Proactive 3213872554552254621415Answer16Excel 2007

View 3 Replies View Related

How To Convert From COUNTIFS To SUMPRODUCT Function

Feb 25, 2014

convert this equation into sumproduct function..??

=COUNTIFS($I3,">="&$AC$3,$I3,"<="&$AC$4)

View 6 Replies View Related

Convert SUMPRODUCT Formula To Use SUMIFS Or COUNTIFS

May 1, 2012

I have a large metrics spreadsheet that has thousands of formulas using SUMPRODUCT. We are using Excel 2007/2010 now and I wondered if there was a way to convert these type of formulas to use the SUMIFS or COUNTIFS. I can do simple ones with 1 or 2 criteria where its AND, but then there is a combined OR and AND like this one has I cannot get them to work right, am I stuck with using SUMPRODUCT? My hope was to speed up the overall calculation speed. Note: The data spreadsheet 'Sheet2' contains 64555 rows, I write these formulas using VBA so that the range is finite to the actual data range is why you see 64555.

=SUMPRODUCT(--('Sheet2'!$J$3:$J$64555=$A6),--(('Sheet2'!$I$3:$I$64555="HOC")+('Sheet2'!$I$3:$I$64555="MGN")))

View 2 Replies View Related

Countifs With Named Ranges?

Jul 19, 2012

I have some named ranges and am trying to do a "Countifs" based off the named ranges. But Excel is giving me obvious incorrect data (my fault, not Excel's). I can't really post a pic of the issue, hopefully it's an obvious error on my part.

For instance

SpecialPart is a named range consisting of part numbers that I want to count seperately from all others.

PartNumber is a named range of all parts shipped for a period.

I used countifs becuase I am also checking by month. The month part works fine because I use it in other countifs. It's just this one that isn't working for me.

My formula looks like this;

=Countifs(Pmonth,Month(A3),PartNumber,SpecialPart)

As mentioned, the month part of the formula works in other calculations, but the Part/SpecialPart calculation keeps returning a "1" even though there are multiple instances of a match for each month. A manual count of January showed about 100 lines that should have been counted.

View 2 Replies View Related

How To Forecast Delivery Dates Based On Several Complex Conditions

Apr 10, 2012

I am trying to project the delivery dates of my shipments which is sent via courier to different destinations from my Distribution Centre.

The courier company delivers the parcels across Monday to Saturday(Sunday being the off day for the courier). There are different transit days for different locations which works in deriving the project dates from the shipping date. I am looking for a formula which can satisfy all the following conditions and project the delivery dates accordingly:-

Condition1:-If the projected delivery date falls on Sunday and there is no holiday on the very next day(Monday) then the projected delivery dates needs to be on Monday.

Condition2:- If the projected delivery date falls on Sunday and the very next Monday is a Holiday then the projected delivery dates needs to be on Tuesday.

Condition3:- If the projected delivery date is a Holiday and the holiday falls on any day between Monday to Friday then the delivery date will be the next working day post the holiday(between Mon-Sat).

Condition4:-If the projected delivery date is a Holiday and the holiday falls on Saturday then the delivery date will be next Monday.

Condition5A/5B/5C:-In case there are more than one holidays at a stretch(2/3 days of holidays at stretch) and if the projected delivery dates falls within the holidays then the projected delivery dates needs to be on the next working day(Between Monday to Saturday).

I have tried to write a formula but it is only satisfying the Condition1,Condition2 & Condition3. I am providing a sample data with desired results based on the above conditions. Any single formula which can derive the desired results.

Sheet1  ABCDEFGH1Destination LocationDispatch DateTransit DaysProjected
Delivery Dates(Desired Result)Remarks  Courier Company Holiday List2A29-Mar32-Apr
Condition1:-Projected Delivery Date As Per Transit-Days Is Sunday(1st Apr) & There Is No Holiday On Next Monday(2nd Apr) & Hence REVISED Projected Delivery Date Needs To Be On 2nd Apr(Mon).

[Code] ....

View 3 Replies View Related

Countifs Function Using Dates And For Loops

Jul 14, 2014

I am trying to develop a For Loop that will do countifs functions based on the criteria in the For Loop. Part of the countifs criteria is determining which values in a range are within certain dates. I have isolated the month and year data and am looping with for loops through the years (outer loop) and months (inner loop). The issue that I am running in to is how to place the month and year into the countifs in VBA: month/year. When I do these calculations in the spreadsheet it is easy to write for one of the criterias: ">=1/2013", but trying to do that same formula with variables is become much more challenging.

How could I write a countifs that uses variables to do the same as ">=1/2013"? In essence: ">=monthCount/yearCount".

View 8 Replies View Related

Countifs Two Date Columns And Count Number With Equal Dates

Oct 23, 2012

I have a spreadsheet with two colums with dates. The names of the ranges are 'DataContractualStartDate' and 'DataContractualEndDate'.

How do I manage to count the no. of records with equal dates at the same row?

I have used the following but this gives me zero, while in the example below the result should be 3.

=COUNTIFS(DataContractualStartDate,DataContractualEndDate)

The table looks as follows:

dContractualStartDate
dContractualEndDate

01-05-2012
01-05-2012

[Code] ....

View 6 Replies View Related

CountIfs With Between Dates And Two Extra Criteria That Excludes Blank Cells In Another Column

Aug 3, 2013

I have been using CountIfs with a lot of luck until I added one extra criteria that it ignores.

ORIGINAL FORMULA
=COUNTIFS(ADate, ">" & N$2, ADate, "=" & 10000, WBid, "" & N$2, ADate, "=" & 10000, WBid, "

View 1 Replies View Related

Sumproduct With Different Ranges

Nov 5, 2008

I'm attempting to do a sumproduct with different dimensioned ranges. I've read multiple posts that say that all ranges in a sumproduct must have the same dimensions. I've tried different commands (index/match/lookup, etc) with no luck. Perhaps someone can come up with a solution for me....

View 7 Replies View Related

Can SUMPRODUCT Be Used When Only Two Ranges Are Specified

Aug 7, 2007

I can't get the following formula to work...

SUMPRODUCT((Range1Range2)*(DollarValue))

Basically I have a master sheet of data:

Range1 DollarValue
AAA 20
BBB 35
CCC 5
DDD 10

and a separate sheet with items i want excluded from the calc:

Range2
BBB
DDD

I want the SUMPRODUCT to give me a value of 25 (AAA + CCC, excluding BBB and DDD from the calc). However, I'm getting #N/A in my formula cell. Is there an easy way to do this other than specifying each value to exclude, e.g. SUMPRODUCT((Range1"BBB")*(Range1"DDD")*(DollarValue))

I have a lot of values to exclude, so this could get very hard to manage...

View 9 Replies View Related

SUMPRODUCT Using Named Ranges

Mar 27, 2014

I am using the SUMPRODUCT formula below and it seems to be working

=SUMPRODUCT(('Attendance Data'!H:H="XXX")*('Attendance Data'!D:D="YYY"))

This, as I understand it is counting the number of times a row contains the text "XXX" in column H and also contains the text "YYY" in column D.

This seems to work for me.

Now my problem is when I want to change the formula to search for the text "XXX" in column H and also any text that apperas in a named range on another sheet in column D. The named range is called "New_Starters"

I am using the below formula which is returning N/A's.

=SUMPRODUCT(('Attendance Data'!D:D=New_Starters)*('Attendance Data'!H:H="XXX"))

View 4 Replies View Related

#Value! Error When Doing Sumproduct Of Two Ranges

Oct 2, 2007

I have a weird problem with some cells calculating (for example) =sumproduct(bundleNoNRP, bundleNoQTY). There are a number of cells with similar formulas calcutating with named ranges, and they all display #Value (a value of the wrong data type is used in this formula).

Both these ranges are set up via a VB program.
If i just seperately on the sheet do the sum of either of these ranges it works fine.

What could be going wrong? Is there some way of checking whats in the ranges? I cant see why the data type would be wrong if I can do sum calcs ok..Is there some rule which would mean the calculation wouldn't work anymore? This is part of a much larger VBA project so I hope I have provided enough information.

View 9 Replies View Related

Dynamic Ranges And Sumproduct

May 2, 2007

I'm having a fit with this formula; maybe the gurus will show me what I'm doing wrong. I have a list of area numbers along with dollar amounts that go with these area numbers. I have created a named range named "Areas" and another one named "MO_PD".

At the bottom of the worksheet I am doing a recap that takes the area number and sums all the entries in the MO PD column. This approach has been done before with Thomach's help. I'm trying to mimic it, but it's not working for me.

NOTE - I know that I can get around this using a pivot table, but I would like to use this approach for now. I would at least like to know what I'm doing wrong. Also, I'm not totally sure if I did the dynamic named ranges correctly so that may need to be fixed.

View 9 Replies View Related

Using Multiple Sum Ranges In Sumproduct() & Countif() In Array

Jul 2, 2009

My problem is :

1.In G Column I put logic for Fail and Obtained Marks.

G2=IF(COUNTIF(B2:F2,">=60")=5,SUM(B2:F2),"Fail")

2. Now in H column I want use this formula which I obtained from this forum

H2=SUMPRODUCT((G$2:G$7>G2)/COUNTIF(G$2:G$7,G$2:G$7&""))+1

To get the position of Students.

But the text value "fail" in the G2:G7 getting Position No. 1 and i've noticed the reason by using evaluate formula as well.

3. I got solution by changing "Fail" with 0 by creating column I and then column H put this formula ........

View 14 Replies View Related

Using Multipel Sum Ranges In Sumproduct() & Countif In Array

Jul 6, 2009

I want to get students positions in a class like 1st, 2nd, 3rd, etc. There can be two 1st position and 2 2nd positions at a time .

1.In G Column I put logic for Fail and Obtained Marks.
G2=IF(COUNTIF(B2:F2,">=60")=5,SUM(B2:F2),"Fail")
2. Then i made array formula in column H to get the position
={SUMPRODUCT((IF(ISNUMBER($G$2:$G$7),$G$2:$G$7,0)>N(G2))/COUNTIF(G$2:G$7,G$2:G$7&""))+1}
Some improvement to write fail & position
={IF(COUNTIF(B3:F3,">=60")5,"Fail",SUMPRODUCT((IF(ISNUMBER($G$2:$G$7),$G$2:$G$7,0)>N(G3))/COUNTIF(G$2:G$7,G$2:G$7&""))+1)}
And more work to get total marks & position and Fail at the same time......
={IF(COUNTIF(B2:F2,">=60")5,"Fail",SUM(B2:F2)&"-"&SUMPRODUCT((IF(ISNUMBER($G$2:$G$7),$G$2:$G$7,0)>N(G2))/COUNTIF(G$2:G$7,G$2:G$7&""))+1)}
Now I wounder that is there a way to do all calculations in column H without using column G

By replacing (if there is any method) G2, G3, G4 etc. with Sum(B2:F2); Sum(B3:F3);Sum(B4:F4) etc. in below formula
={SUMPRODUCT((IF(ISNUMBER($G$2:$G$7),$G$2:$G$7,0)>N(G2))/COUNTIF(G$2:G$7,G$2:G$7&""))+1}.....................

View 9 Replies View Related

Excel 2010 :: Sumproduct Of Unique Values In Multiple Ranges

Jul 31, 2014

I have 3 ranges of data which each have a quantity and a length. I want to create from these ranges a list of unique values with the total quantity required of each value (as shown). Inputs on any column may be blank but where there is a length, there will be an adjacent quantity to the left.

I'm using Excel 2010.

View 9 Replies View Related

Sumproduct Between Two Dates

Oct 14, 2012

I am required to work out some transaction vlaues, that fall between two dates.

I thought since i have 4 arguments to attend to, sumproduct would do the trick. It wont work and i cant work out why

The base of my argument is to look to locate if a particluar account has had transactions processed between a specfied date range, if so sum the period.

Date 1
date2
Account Number
Volume
Value

16/04/12
01/05/12
14142541
0
£0.00

[code]....

View 9 Replies View Related

SUMPRODUCT Miscounting Dates

Aug 15, 2013

I have a problem with the formulae SUMPRODUCT, it seems to be miscounting? Now I am sure there is something silly I have missed, but I could really do woth someone else taking a glance over it before I have to look at another option to get the result I need.

The ultimate goal here is to count how many occurrences happen in each month, there is a list in Sheet1 of the attached Excel document, then in Sheet2 there is the two different formulas I have tried, but the count is wrong? For teh first month of instances June 2012 it counts 20, but there are 21?

Example of Issue.xlsx

View 8 Replies View Related

Sumproduct Formula With Dates

Apr 12, 2007

I have a workbook which contains multiple lines of data. In column H it contains a date. I want to count how many of these dates occur in January. I also want to be able to add other criteria as well. Example, column H = Janaury and column D=Open. In cell B2 I have the number 1 which represents “January”. Below is my formula but it returns an error.

=SUMPRODUCT((MONTH('Raw Data'!H:H)=B2))

View 9 Replies View Related

SUMPRODUCT In VBA With Dates As Strings

Nov 4, 2007

I am currently coding up a VBA macro that will counts up the number of occurrences of a particular event for a particular date. The problem is that it keeps returning zero as the result. I thought it might have been a data type mismatch issue as the cell format is a date in the mm/dd/yyyy format but the data is stored as a string so that I can easily manipulate it with the built in VBA functions. I tried changing the data type but still received zero as the result. 'a' and 'c' refer to cell ranges, criteria is a string of characters and criteria2 is a string that pulls in a date in the format of mm/dd/yyyy. I know this code works when I don't use dates but I can't figure out why it doesn't work with dates.


criteria = Application.Workbooks(FileName).Worksheets("Day_Counts").Range("B1").offset(0, column).Value

View 9 Replies View Related

Sumproduct Not Calculating The Correct Dates

Aug 17, 2009

I have put together the following code (with help from this and another forum):

View 5 Replies View Related

Using Sumproduct To Sum Networkdays Between Dates With Criteria?

Oct 15, 2008

Hmmmm. Looks like I ruined my original posting while trying to mark it solved.

View 14 Replies View Related

Add Sales Between Two Dates Without Using Sum Or Sumproduct Function

Jun 23, 2012

Query below

Date
Sales

1/7/2011
500

2/7/2011
600

[Code] ........

I was given the above table in an interview and was asked to find the sum between two dates without using sum and sumproduct.

View 3 Replies View Related

Sumproduct Month And Year - Count Dates From A List

May 11, 2013

I am trying to count dates from a list using sum product (I found the formula via google) I have plugged it into my spreadsheet but it does not seem to be calculating correctly.

I have attached the spreadsheet too : sumproduct_Error.xlsx

=SUMPRODUCT(YEAR(Tbl_finish[Finish]=2008)*(MONTH(Tbl_finish[Finish]=1)))

I am expecting a count of all the dates in January 2008 with the formula above.

View 5 Replies View Related

COUNTIF Multiple Ranges Dates

Dec 16, 2008

I want excel to count the number of items in a range that I have named "Name" and I have another range that I have name "date" which contains (obviously) dates. The dates are in order. I want to count the number of items in "name" that are associated with the date in the "Date" range.

The problem is I want to count the names in a date range, which is todays date through to 30 days after. I have to days date already posted automatically in K1 [by the formula =TODAY()]

Essentially, count all the times "Bob" appears in the Range "Names" that appear in the next 30 days. My Brain hurts just trying to describe it

View 9 Replies View Related

Lookup Dates With Certain Date Ranges

May 1, 2009

attached worksheet.

The worksheet has two sections, Extra payments and Loan Schedule.

If a date in the Extra Payments section is within a range in Loan Schedule, the enter its corresponding value, or sum of values in the Loan schedule under its respective date.

the attached sheet explains in detail.

View 7 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved