LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default Sumproduct using named ranges and multiple criteria

Hello all I'm currently in a time crunch at work and need some help
developing a forumula to give me totals based of three criteria. I'm really
in a bind here and could use some help as fast as possible.

I'm using named ranges for my columnar data, and I'm attempting to use VBA
combo boxes to give me two of my search criteria. The third criteria is the
in adjacent cells.


My data sources and logic path is Contract Number -- Fiscal Year --
Calendar Month.

My data is pulled from an Access database through several queries and the
ranges: conNum, finDate, and Total are defined using =offset.

What I'm trying to do, is total the invoices that I have by month, and the
user selects the contract that they want with the first combo box, and this
triggers the code to populate the second combo box with the fiscal years that
the contract has invoices for.

I've tried a couple different formula's but they always return an error.
For example this formula returns a #value error. I've done through each step
in the evaluations, and it's not returning the correct values for some of the
logic tests and then ultimately returns a #value when I get to the month
criteria.
=SUM((conNum="varCon")*(YEAR(finDate)="varYear")*( MONTH(finDate)+6=MONTH(Budget!$A12))*Total)

I've also tried this formula, which initially gave me a #name error but now
just returns 1/0/1900 no matter how I adjust the month cell.
=SUMPRODUCT(--(conNum="varCon"),--(YEAR(finDate)="varYear"),--(MONTH(finDate)+6="'Budget'!$A15"),Total)

Both of these formula give "User type not defined" errors from VBA and I'm
not entirely sure where to start looking and how to fix it. The reference to
budget!$A15 is a cell reference to the cell where the month names are stored.
A6:A17 where A6 = July and I dragged down the rest of the months. I'm
placing the formulas in B6:B17 hence the relative cell reference so I can
just drag down the forumula. All of the user configurable and interace is on
worksheet "budget" and I have the ranges and queries on worksheet "data".
If you require anymore information please don't hesitate to ask.

I've looked over several website and many of the links that have been posted
previously in this newgroup, and I've tried modifying several of the formulas
that I've come accross, but I'm still hitting this brick wall.


On a side note, I'm having a seperate issue with a VBA command button and
updating the .connection properties of some pivot tables and queries. The
thread is located he
http://www.microsoft.com/office/comm...f25&sloc=en-us

 
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
Multiple dynamic ranges in a Sumproduct mmartens12 via OfficeKB.com Excel Worksheet Functions 3 August 3rd 06 01:56 AM
Multiple dynamic ranges in a Sumproduct mmartens12 via OfficeKB.com Excel Worksheet Functions 1 August 2nd 06 04:25 AM
COUNTIF with multiple disjoint ranges, same criteria CLR New Users to Excel 0 March 3rd 06 08:00 PM
Dynamic range names, multiple criteria, sumproduct [email protected] Excel Discussion (Misc queries) 1 September 20th 05 02:58 AM
How to Link named ranges from multiple Workbooks into a single Wo. PMAP_HELP Excel Discussion (Misc queries) 1 December 14th 04 05:51 PM


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