Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default More Sumproduct!

I have the following formula in a bit of VBA, which works fine:
"=SUMPRODUCT(('0'!$E$2:$E$5000={""Tranche 4"",""Tranche 4 - R0"",""T4
Prem"",""T4 BNL"",""T4 DS"",""T4 SR""})*('0'!$F$2:$F$5000=$B28))"

However, it's a bit unwieldy and I'd like to introduce wildcards so it would
ideally look more like this and thus better accomodate future changes. I soon
discovered that wildcards don't work in this formula!
"=SUMPRODUCT(('0'!$E$2:$E$5000={""Tranche
4*"",""T4*""})*('0'!$F$2:$F$5000=$B28))"

I've had a good look at the many posts on this topic and have tried some of
the solutions but cannot get the right answers. I'd appreciate any
suggestions you may have!

Many thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default More Sumproduct!

I have done it in Excel, I will leave it to you to adapt back to VBA

=SUMPRODUCT(((LEFT('0'!$E$2:$E$5000,9)="Tranche
4")+(LEFT('0'!$E$2:$E$5000,2)="T4"))*('0'!$F$2:$F$ 5000=$B28))

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Ladymuck" wrote in message
...
I have the following formula in a bit of VBA, which works fine:
"=SUMPRODUCT(('0'!$E$2:$E$5000={""Tranche 4"",""Tranche 4 - R0"",""T4
Prem"",""T4 BNL"",""T4 DS"",""T4 SR""})*('0'!$F$2:$F$5000=$B28))"

However, it's a bit unwieldy and I'd like to introduce wildcards so it
would
ideally look more like this and thus better accomodate future changes. I
soon
discovered that wildcards don't work in this formula!
"=SUMPRODUCT(('0'!$E$2:$E$5000={""Tranche
4*"",""T4*""})*('0'!$F$2:$F$5000=$B28))"

I've had a good look at the many posts on this topic and have tried some
of
the solutions but cannot get the right answers. I'd appreciate any
suggestions you may have!

Many thanks



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default More Sumproduct!

Works brilliantly, thank you for your help.

"Bob Phillips" wrote:

I have done it in Excel, I will leave it to you to adapt back to VBA

=SUMPRODUCT(((LEFT('0'!$E$2:$E$5000,9)="Tranche
4")+(LEFT('0'!$E$2:$E$5000,2)="T4"))*('0'!$F$2:$F$ 5000=$B28))

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Ladymuck" wrote in message
...
I have the following formula in a bit of VBA, which works fine:
"=SUMPRODUCT(('0'!$E$2:$E$5000={""Tranche 4"",""Tranche 4 - R0"",""T4
Prem"",""T4 BNL"",""T4 DS"",""T4 SR""})*('0'!$F$2:$F$5000=$B28))"

However, it's a bit unwieldy and I'd like to introduce wildcards so it
would
ideally look more like this and thus better accomodate future changes. I
soon
discovered that wildcards don't work in this formula!
"=SUMPRODUCT(('0'!$E$2:$E$5000={""Tranche
4*"",""T4*""})*('0'!$F$2:$F$5000=$B28))"

I've had a good look at the many posts on this topic and have tried some
of
the solutions but cannot get the right answers. I'd appreciate any
suggestions you may have!

Many 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
Sumproduct with Condition OR Sumproduct with ADDRESS function - HE gholly Excel Discussion (Misc queries) 2 September 28th 09 05:07 PM
SUMPRODUCT PAL Excel Worksheet Functions 4 August 3rd 09 07:19 PM
Conditional SUMPRODUCT or SUMPRODUCT with Filters Ted M H Excel Worksheet Functions 4 August 14th 08 07:50 PM
sumproduct? sumif(sumproduct)? David Excel Worksheet Functions 3 July 13th 07 07:06 PM
sumproduct help JR Excel Worksheet Functions 0 February 27th 06 02:57 PM


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