Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 79
Default XL VBA function needed for a list of items

I need to sum amounts from 11 sheets that meet 2 different columns on each
sheet. Each sheet is a different company and all sheets have information in
the same format. The first criteria is straight forward match to a state.
The second criteria, however consists of 21 different classes of which I only
want 14 of the 21. I am currently using a SUMPRODUCT formula to gather the
totals by state, but the second criteria makes the formula too long for the
cell (to gather unwanted since there are only 7 and subtract from total). Is
there a way to write a VBA function that would select only lines that match
the 1st criteria and 2nd criteria of 7 classes?

Here's an example of the first part that I am currently using:
SUMPRODUCT(--(LEFT('AL CIP'!E$6:E$175,2)=$A6),'AL CIP'!I$6:I$175)
$A6=the state I'm matching to.

Thanks,
Valerie

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 79
Default XL VBA function needed for a list of items

This is a duplicate post. Microsoft gave an error msg so I submitted again
before realizing it actually did go through.

"Valerie" wrote:

I need to sum amounts from 11 sheets that meet 2 different columns on each
sheet. Each sheet is a different company and all sheets have information in
the same format. The first criteria is straight forward match to a state.
The second criteria, however consists of 21 different classes of which I only
want 14 of the 21. I am currently using a SUMPRODUCT formula to gather the
totals by state, but the second criteria makes the formula too long for the
cell (to gather unwanted since there are only 7 and subtract from total). Is
there a way to write a VBA function that would select only lines that match
the 1st criteria and 2nd criteria of 7 classes?

Here's an example of the first part that I am currently using:
SUMPRODUCT(--(LEFT('AL CIP'!E$6:E$175,2)=$A6),'AL CIP'!I$6:I$175)
$A6=the state I'm matching to.

Thanks,
Valerie

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
List and subtotal selected items, then print separate item list TitanG Excel Worksheet Functions 0 September 8th 08 09:07 PM
2 conditions needed to check and count of items based on that Vijay Excel Worksheet Functions 2 May 3rd 07 10:21 PM
Function to count unique items in list XP Excel Worksheet Functions 2 April 10th 06 06:30 PM
named range, data validation: list non-selected items, and new added items KR Excel Discussion (Misc queries) 1 June 24th 05 05:21 AM
need function to sum top ranking items in list QuantumPion Excel Worksheet Functions 13 June 6th 05 10:42 AM


All times are GMT +1. The time now is 04:26 AM.

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"