LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default SUMIF with OFFSET

Hello

I am trying to find a way to use SUMIF with OFFSET on a range of variable
length. My data is organized in this manner:

Each row represents one fee charged to a client on a particular date.

Column E contains the names of the fees that are charged. Each client has
at least one entry for Fee1 through Fee5. The number of rows for any
particular client may increase during the year.

A blank row will separate clients from each other (Row 18 in this example).
There may be more than one blank row between clients.
Rows 9 - 17 represent fees charged to one client (Client 1).
Rows 19 - 23 represent the fees charged to the next client (Client 2).

Column F in each row may have an entry or it may be blank.

Col E Col F

Row 9 Fee1 10
Row 10 Fee2 20
Row 11 Fee3 30
Row 12 Fee4 40
Row 13 Fee5 50
Row 14 Fee1 10
Row 15 Fee4
Row 16 Fee1
Row 17 Fee2 20
Row 18 blank
Row 19 Fee1 10
Row 20 Fee2 20
Row 21 Fee3 30
Row 22 Fee4 40
Row 23 Fee5 50

I am trying to create a formula to add up all of the Fee1 charges for Client
1. Since the number of rows for Client 1 will vary, I am trying to use the
MATCH function to identify the number of rows associated with Client 1 by
looking for the first blank cell in Column E at the bottom of the data for
each client.

The following formula gives a #REF! error. When I step through the formula,
the two OFFSET functions appear to show the correct inputs of OFFSET(E9, 0,
0, 9, 0) and OFFSET(F9, 0, 0, 9, 0), but each one individually gives the
#REF! error. The value in cell E9 is the text string "Fee1". The total of
Fee1 for Client 1 should be 20 in this example.

=SUMIF(OFFSET(E9, 0, 0, MATCH(TRUE,INDEX(ISBLANK(E9:E60),0,0),0)-1, 0), E9,
OFFSET(F9, 0, 0, MATCH(TRUE,INDEX(ISBLANK(E9:E60),0,0),0)-1, 0))

According to the Excel help, #REF! errors mean that the OFFSET goes beyond
the edges of the worksheet, but I don't think I am doing this. Any help
would be gratefully appreciated, either in fixing this formula or offering a
better solution. Whatever formula I use will need to be copied down for
several hundred clients. Thank you in advance!

 
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
Compare Cell Values, Offset(-1,0), Offset(-1,-1), and xlFillDefaul RyGuy Excel Worksheet Functions 2 September 28th 07 10:54 PM
SUMIF/OFFSET Query Neil Webber Excel Worksheet Functions 4 February 9th 07 02:48 PM
Trying to use sumif and offset functions hizzle Excel Discussion (Misc queries) 5 February 9th 06 11:47 PM
offset? match index? sumif? 2way look-up? cjjoo Excel Worksheet Functions 2 October 26th 05 10:02 AM
SUMIF - Range name to used for the "sum_range" portion of a SUMIF function Oscar Excel Worksheet Functions 2 January 11th 05 11:01 PM


All times are GMT +1. The time now is 06:51 PM.

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"