Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
John
 
Posts: n/a
Default Add up a Dynamic Range with 2 Variables

I am trying to add up a Dynamic column if 2 variables are valid. I've tried
the folowing formula with only 1 variable and it works great

=(SUMIF(StaffType,"="&K13,Basic))

K13=Hourly and "Basic" is a range name set for total minutes worked

However what I want to do is add up Basic for only Hourly staff AND a
specific day. I have this day variable in AH9 and the Dates are in a Range
name called "DalyDate". I've tried the following but
there is an "too few arguements" error in the formula which I can't work
out. Is it possible?

=(SUMIF(AND(StaffType,"="&K13,DailyDate,"="&AH9,Ba sic))))


Thanks




  #2   Report Post  
Aladin Akyurek
 
Posts: n/a
Default

If the ranges are equally sized (vectors)...

=SUMPRODUCT(--(StaffType=K13),--(DailyDate=AH9),Basic)

John wrote:
I am trying to add up a Dynamic column if 2 variables are valid. I've tried
the folowing formula with only 1 variable and it works great

=(SUMIF(StaffType,"="&K13,Basic))

K13=Hourly and "Basic" is a range name set for total minutes worked

However what I want to do is add up Basic for only Hourly staff AND a
specific day. I have this day variable in AH9 and the Dates are in a Range
name called "DalyDate". I've tried the following but
there is an "too few arguements" error in the formula which I can't work
out. Is it possible?

=(SUMIF(AND(StaffType,"="&K13,DailyDate,"="&AH9,Ba sic))))


Thanks




  #3   Report Post  
John
 
Posts: n/a
Default

Thanks, Bob and Aladin, works great


"Aladin Akyurek" wrote in message
...
If the ranges are equally sized (vectors)...

=SUMPRODUCT(--(StaffType=K13),--(DailyDate=AH9),Basic)

John wrote:
I am trying to add up a Dynamic column if 2 variables are valid. I've

tried
the folowing formula with only 1 variable and it works great

=(SUMIF(StaffType,"="&K13,Basic))

K13=Hourly and "Basic" is a range name set for total minutes worked

However what I want to do is add up Basic for only Hourly staff AND a
specific day. I have this day variable in AH9 and the Dates are in a

Range
name called "DalyDate". I've tried the following but
there is an "too few arguements" error in the formula which I can't work
out. Is it possible?

=(SUMIF(AND(StaffType,"="&K13,DailyDate,"="&AH9,Ba sic))))


Thanks






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
Passing a range name as an argument to the Index Function Michael Sharpe Excel Discussion (Misc queries) 3 September 5th 12 01:33 PM
Defined range difficulty Pat Excel Discussion (Misc queries) 7 January 16th 05 09:52 PM
Dynamic Range Problem [email protected] Excel Discussion (Misc queries) 4 January 4th 05 06:55 PM
Add a Dynamic Range with 2 Conditions Q John Excel Worksheet Functions 7 December 23rd 04 02:58 PM
named range refers to: in a chart Spencer Hutton Excel Discussion (Misc queries) 1 December 14th 04 10:15 PM


All times are GMT +1. The time now is 02:41 PM.

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"