Spin Box Date and Sumproduct

```Is it possible to use a date (created via an INDEX calculation) within a
SUMPRODUCT calculation?

I use a SUMPRODUCT calculation to generate headcount figures off monthly
master sheets as per the following:
=(SUMPRODUCT(--(Apr09!\$O\$1:\$O\$6000="XN01"),(Apr09!\$CI\$1:\$CI\$6000))).

However, I would like to now change the date source of the data based on a
month name generated by a Spin Box so that when the month changes fropm Apr09
to May09, the SUMPRODUCT calculation refers to the sheet of May instead. So
how do you join the '\$O\$1:\$O\$6000' part to the cell containing the month date?

Thanks
```
 0
Utf
1/14/2010 4:33:02 PM
excel.worksheet.functions 4936 articles. 2 followers.

3 Replies
706 Views

Similar Articles

[PageSpeed] 43

```If all the data was on one sheet, you could use the INDEX function with the
MATCH function to have the data shift. Since you want to change sheets, this
won't work.

However, you can use the INDIRECT function (see XL help file for more
detail). If the Spin Box is changing the Month name (and not the year) and
this info appears in cell A1, formula would be:

=SUMPRODUCT(--(INDIRECT(A1&"09!\$O\$1:\$O\$6000")="XN01"),(INDIRECT(A1&"09!\$CI\$1:\$CI\$6000")))

--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*

"JPDS" wrote:

> Is it possible to use a date (created via an INDEX calculation) within a
> SUMPRODUCT calculation?
>
> I use a SUMPRODUCT calculation to generate headcount figures off monthly
> master sheets as per the following:
> =(SUMPRODUCT(--(Apr09!\$O\$1:\$O\$6000="XN01"),(Apr09!\$CI\$1:\$CI\$6000))).
>
> However, I would like to now change the date source of the data based on a
> month name generated by a Spin Box so that when the month changes fropm Apr09
> to May09, the SUMPRODUCT calculation refers to the sheet of May instead. So
> how do you join the '\$O\$1:\$O\$6000' part to the cell containing the month date?
>
> Thanks
```
 0
Utf
1/14/2010 4:43:01 PM
```If month name is in A1 then
=SUMPRODUCT(--(OFFSET(INDIRECT(ADDRESS(1,15,1,1,A1)),0,0,6000)="XN01"),OFFSET(INDIRECT(ADDRESS(1,3,1,1,A1)),0,0,6000))

--
Regards!
Stefi

„JPDS” ezt írta:

> Is it possible to use a date (created via an INDEX calculation) within a
> SUMPRODUCT calculation?
>
> I use a SUMPRODUCT calculation to generate headcount figures off monthly
> master sheets as per the following:
> =(SUMPRODUCT(--(Apr09!\$O\$1:\$O\$6000="XN01"),(Apr09!\$CI\$1:\$CI\$6000))).
>
> However, I would like to now change the date source of the data based on a
> month name generated by a Spin Box so that when the month changes fropm Apr09
> to May09, the SUMPRODUCT calculation refers to the sheet of May instead. So
> how do you join the '\$O\$1:\$O\$6000' part to the cell containing the month date?
>
> Thanks
```
 0
Utf
1/14/2010 5:00:02 PM
```Fantastic, thats the finishing touch I needed!

"Luke M" wrote:

> If all the data was on one sheet, you could use the INDEX function with the
> MATCH function to have the data shift. Since you want to change sheets, this
> won't work.
>
> However, you can use the INDIRECT function (see XL help file for more
> detail). If the Spin Box is changing the Month name (and not the year) and
> this info appears in cell A1, formula would be:
>
> =SUMPRODUCT(--(INDIRECT(A1&"09!\$O\$1:\$O\$6000")="XN01"),(INDIRECT(A1&"09!\$CI\$1:\$CI\$6000")))
>
> --
> Best Regards,
>
> Luke M
> *Remember to click "yes" if this post helped you!*
>
>
> "JPDS" wrote:
>
> > Is it possible to use a date (created via an INDEX calculation) within a
> > SUMPRODUCT calculation?
> >
> > I use a SUMPRODUCT calculation to generate headcount figures off monthly
> > master sheets as per the following:
> > =(SUMPRODUCT(--(Apr09!\$O\$1:\$O\$6000="XN01"),(Apr09!\$CI\$1:\$CI\$6000))).
> >
> > However, I would like to now change the date source of the data based on a
> > month name generated by a Spin Box so that when the month changes fropm Apr09
> > to May09, the SUMPRODUCT calculation refers to the sheet of May instead. So
> > how do you join the '\$O\$1:\$O\$6000' part to the cell containing the month date?
> >
> > Thanks
```
 0
Utf
1/14/2010 5:05:01 PM
 Reply:

Similar Artilces:

Date #9
One column has the date which I enter manually. If I type 15may it converts immediately to 15-May which is great. But how can I get the line to enter dates automatically? What I need is to enter one date (say, 20 May) and for all lines below to automatically add 1 day at a time, either at the time of starting the line, or even before in one go. Thank you very much JB You can use a formula, if you add the date in A2, in A3 put =IF(A2="","",A2+1) copy down as long as needed and format the cells the same way as in A2 -- Regards, Peo Sjoblom "JB"...

Date and Time
Is it possible to have a cell show the current date and time without entering it, like in word? Nick If you want the current date and time, updated whenever a calculation occurs, use =NOW(). If you want to enter the current date, without updating, press CTRL+; -- Cordially, Chip Pearson Microsoft MVP - Excel www.cpearson.com chip@cpearson.com "Lord Of The Morning" <Not@aol.com> wrote in message news:vmjpgijrjvs5c5@corp.supernews.com... > Is it possible to have a cell show the current date and time without > entering it, like in word? > > Nick > >...

Can Drop Down Boxes jump to the answer as you type?
If I create a form with VBA, to create a drop down box to have a list to pick an answer for to fill in a cell in a worksheet, it will jump to the answer in the list as you type. Can a Data|Validation|List do the same thing? If not, is there a way to get that functionality in Excel? Data Validation doesn't support autocomplete. If you can use programming, there are instructions here for adding a combobox from which you can select one of the values from the data validation list. In the combobox, you can enable autocomplete: http://www.contextures.com/xlDataVal11.html rrucksda...

Restricting input box entries to integers
Dear Experts: below macro applies a user-defined paragraph style to rows using an input box. The macro is running fine. But the input box also allows for entries such as 7,2 (comma because I live in Germany). How do I have to re-write the code to only allow integers as input box entries? Help is much appreciated. Thank you very much in advance. Regards, Andreas Sub Tbl_BodyStyle() Dim oRng As Word.Range Dim oTbl As Word.Table Dim AskRowNumber As String Dim blnAsk As Boolean If Not Selection.Information(wdWithInTable) Then MsgBox "Please place the cursor...

Self-Made Combo Boxes not working correctly...
Okay all.. Here's my deal... I have tried and tried and tried to get these to work... I'm going to post what I have done, and what I am trying to do, and see if someone can help me figure crap out... tblBuilding - PK is BuildingIDNum - Autonumber tblBuildingZones - FK is BuildingIDNum via SELECT DISTINCTROW Building.BuildingIDNum, Building.Name FROM Building ORDER BY Building.BuildingIDNum; cboBuilding - This has Building 1, Building 2, etc. The field displaying this info is "Name" in tblBuilding. cboBuildingZones - This has different "zones" for Building 1,...

Question about Date validation
Hi All, I'm working on a form for weekly data entry. I'd like to create a date field where the user will enter the date the week ends (ie week ending Friday, June 25th). Is there a way to write code so that Access will check that the day the user inputs is a Friday (and if not they will recieve an error message)?. I know how to program the error message pop-up box, but I have no idea how to write code to check if the date inputted is a Friday. Any help would be greatly appreciated! Thanks Use the WeekDay function If WeekDay(Me.DateField) = 6 Then MsgBox "Error" En...

Need help with Combo Box?
I would appreciate any help with this. I currently have a form with two combo boxes and a subform. The first combo box lists counties and the second box lists doctors in selected county. After selecting county, doc the subform lists pts for this doc. All this works fine. However, I need to add a couple of more filters. I am stuck and would like to know how to do this. I don't want to mess up what I already have. How can I incorporate a couple more filters? I thought maybe adding an option box to the form????? Can someone please help me to accomplish this? Thank you. Sure...

Do I need DSClient to run Exchange 5.5 on an NT4.0 box in Windows 2003 Native Mode ADS?
Good Evening, I am in the process of migrating my WinNT4.0 domain and Exchange 5.5 Org to Windows 2003 ADS/Exchange 2003. I know best practice is to change the domain to Native mode, but how does this affect my NT4.0 server running 5.5? Do I need to simply load the DSClient onto the server? I should also note that we did an inplace upgrade from NT 4.0. This is a single domain environment. As long as you no longer have NT 4.0 BDCs you should be able to move to native mode. Your NT 4.0 server running E55 will not be affected (unless of course it is also a BDC). It is a good idea to...

Date Problem !!
hi there i have a big problem with the dates. i enter 09/10/2005 in a cell and it changes to 10/09/2005 !! big problem. it shows 10/09/2005 in the cell but 09/10/2005 in the formula bar !! 2 different dates very confusing is there a way of telling it to use just one kind ??? thanks -- cassy01 ------------------------------------------------------------------------ cassy01's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=780 View this thread: http://www.excelforum.com/showthread.php?threadid=473175 It's the same date, it's just formatted differently o...

Grouping dates in pivot table
I am pulling data from a SQL Server database to create a pivot table. Excel (07) is not recognizing the field as a date. This is a field I would like to group by in the pivottable. I am aware of all the techniques to convert this to a date field, but I am searching for an answer as to why XL pivot tables cannot consume the dates directly from a sql query. I have played with bringing the dates back in a number of differenent formats with no success. Any insights into this would be appreciated. Probably coming in as text and yuo may only need to copy an unused cell and paste sp...

dates
Hi there - I am a new user, have only started using excel 2 days ago but am really enjoying it. I have managed to create timesheets that automatically calculate the time spent on a project. Anyway, enjoying it very much. So, I have dates running down the left hand column (A), eg, 05.10.05. Currently I am inputting these by hand because if I drag that cell down it creates 05.10.06, 05.10.07 etc. I have messed with the 'custom' setting and changed it to 'dd.mm.yy' but this has not solved it. Any help much appreciated. By the way, it's excel 2001 for mac. Tom -- small ...

how do i change dates on my calendar and keep my pics
Publisher doesn't support this. You would need to do it manually. -- Brian Kvalheim Microsoft Publisher MVP http://www.publishermvps.com ~pay it forward~ This posting is provided "AS IS" with no warranties, and confers no rights. "Bob T" <Bob T@discussions.microsoft.com> wrote in message news:68671977-F71B-444F-AE72-801D2B359FEE@microsoft.com... > ...

Hiding tasks with due dates in the distant future
I'd like to display only my tasks for the next month or so. How can I filter out those that are in the distant future or recurring tasks that won't be due until next year or the year after? Hi, Goto the Tasks folder. Goto the Customize current view. Click on the Filter Button. Goto the Advanced Tab. Under define more criteria, clickon the Feilds and then select All Task Feilds and then select Due Date. Then under the condition Select Between and then in the Value enter the range of dates ( say 3/8/2004 and 3/10/2004 ). Hope this helps !!! With Regards, Sudharson.AN "Ambe...

Historical Stock Status As of Date
This is a multi-part message in MIME format. ------=_NextPart_000_00A5_01C8845C.ADFC9B50 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello, I'd like to know whether anyone has encountered an issue wherein the As = of Date that is printed in the Historical Stock Status Detailed by Item = does not follow the date as indicated in the report options screen. = Currently we are trying to print the said report but no matter what date = we put in, the As of Date that prints on the report is set to 30 Jan = 2008. Is there anything that we...

Using skins in a multiline edit box
Hi, I have a dialog based application, in which I have a multi-line edit control. In the edit control, I would like to have a background image, say some .bmp file. Some status messages are to be displayed in the edit control, based on certain user actions in the dialog. How do I go about this? Thanks, Sucharit you can do it, i think, if you were to create a class which inherited from the edit control, then in the override the OnDraw()/OnPaint() event, where you first get the rect, and draw your bitmap resource, then call the parent event method to do the rest... I don't know if t...

Find the number of years between two dates
I have aroster of players with thier date of births. I would like to automatically add their ages in another column Try this Formula, assuming that the dob is in cell A1 =DATEDIF(A1,NOW(),"y") & " years, " & DATEDIF(A1,NOW(),"ym") & " months, " & DATEDIF(A1,NOW(),"md") & " days" regards Mukesh "duke" wrote: > I have aroster of players with thier date of births. I would like to > automatically add their ages in another column On Fri, 9 Sep 2005 19:47:02 -0700, "duke" <duke@disc...

Excel's column width format box
Does anyone know why I am unable to enter a number into Excel's column width box, yet using the mouse, I am able to adjust the width. When opening the text box, I can delete the number that appears, but am unable to even reenter that one after it is deleted. I must tell you that I'm a new user who's working through numerous tutorials. Thanks, Hi do you get an error message or what happens exactly -- Regards Frank Kabel Frankfurt, Germany rly2rys wrote: > Does anyone know why I am unable to enter a number into Excel's > column width box, yet using the mouse, I am ...

Why do sheet tabs keep disappearing? Box in Tools is checked.
When I open a new or existing Excel file, the sheet tabs at the bottom may or may not show up. I have repeatedly gone to Tools, Options, View and made sure the sheet tabs box is checked, but still no tabs. How do I get them back? I can't get from one page of a workbook to another. This is in Offfice 2003. Hi Arlie, Try Tools/Options/General In the Sheets in new workbook box, check and see how many sheets are set to appear when opening a new workbook. Larry -- keithl816 ------------------------------------------------------------------------ keithl816's Profile: http://w...

Todays Date that does not update
I created a macro and a button that when clicked it entered todays date in a cell, which is what I wanted. I used "Today( )". Problem is the date keeps updating to todays date and I want it to stay the date I entered it in. Is there some other value or formula to do this so it does not update everyday? Thanks!! You need to enter the date itself. Any function will always update to the current date. Ctrl+; will enter the current date in a cell. In VBA, use Range("A1").Value = Date -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC...

How can i use a command button to validate date and time
I have two command buttons, each on a different sheet. i need both of them to put the current date in one cell on its sheet and current time in another on its sheet. i also need these cells to be locked so the user can only edit these cells by clicking the command button. Any answers? ...

Check Boxes #6
Is there an "easy" way to add check boxes to a worksheet? As it stands, I have to manually attach it to the underlying cell, and adjust the size. I would like to add several hundred checkboxes. Am I doing somethig wrong, or is it just that akward and labor intensive in Excel? Hi Adam, Try: '=============>> Public Sub Tester01() Dim SH As Worksheet Dim rng As Range Dim rCell As Range Set SH = ActiveSheet '<<==== CHANGE Set rng = SH.Range("A1:A100") '<<==== CHANGE Application.ScreenUp...

Synchronize combo boxes
I am trying to sync to combo boxes on a form. It is for plant names which consist of Genus + Species + Subspecies, basically. I have all my data in a single table and I want only applicable species to show up for a particular Genus, for example: Abies concolor Abies glauca Abies alba Quercus alba Quercus macrocarpa Any genus can have many species, some of those species names can exist within multiple Genus names, I have made to seperate tables with just Genus and just Species names, I want them to link in the combo boxes, any ideas? Previously responded to... Regards ...

date confusion
hi im new to excel 2007 i want to ask that when i type 7/4 in a cell excel thinks that the slash is division operator so it divides it ?? but in different cell it interpret it as date ok another problem is that when I enter 7/4 in the different cell excel interpret it as 4-Jul only but How do I display the year too ? even if i type 7/4/2008 or 7/4/08 it still shows 4-JUL ? Help please thank you very much Format the cell as m/d/yyyy, you created the d-mmm format by just entering 7/4 so you need to reformat the cell to the date format you want. Always use the full date when entering dat...

DATE 01-04-08
Hello again! I am using this code =DateSerial(Year([Opened Date]),Month([Opened Date]),Day([Opened Date])+10) on my form....is there a way for the date to get recorded in the main table as well. because on the form and the report it shows up, but not in my main table...do I need to run an update querie or something??? Any suggestions?? Thanks Ransom Ransom, It would be simpler like this: =[Opened Date]+10 Is Opened Date a field in the same record as where you want to record this calculated date value in the table. So this date, whatever it is, will always be 10 days after the Ope...

Conditional Formatting for Image box on Continuous Forms
Hello again, This problem is driving me crazy. I am a car enthusiast and love taking photos of classic cars. I have a table which describes the make and model in a series of fields. There are several fields that contain a reference to photos of those cars. Ie: the fields are called "Front" "Side" "Rear" "Angle". My form has four image boxes to display the images stored in these fields. But when I open the form all the records show the images of the first car only. I asked about this a few days ago and was advised to check out http://www.lebans.co...