Welcome to the { mindfrost82.com } forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

Go Back   { mindfrost82.com } > Gadget Corner > Tech Newsgroups > Microsoft > MS Office > Excel

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-12-2008, 03:30 PM
Craig Brandt
 
Posts: n/a
Excel 2003 - VBA - SUMIF

Here is a tough one:

I have a table with rows of information including an ID Code. The ID code is
made up of four characters, each meaning something distinct. I want to
create a flexible reporting system where the user can specify which of these
rows to include in the report. Up to here there have been no problems,
example;

Code IMDA specifies an account that is active, indicated by the "A". Most
accounts are Active but there is also the possibility for it to be Inactive,
in which case the Code would have been IMDI, for Inactive. To gather the Net
Worth of these accounts, I simply look for the distinct code.


SUMIF(A5:A1500,"IMDA",CW5:CW1500)

SUMIF(A5:A1500,"IMDI",CW5:CW1500)



Challenge:
I would like to have the ability to use wildcards (+) in the Code to
indicate that any character in that position should be considered a match.
The above code would produce a report that has two cells showing all Active
IMD accounts (IMDA), and all Inactive (IMDI).



I would like to offer the user the ability to insert the wildcard by
changing the code to be able to handle a Pseudo Code of IMD+ where the last
character is inconsequential to a match. In the real world, this "+" could
be in any position.



Does anyone have any suggestions on how to proceed?

Craig




Reply With Quote
  #2 (permalink)  
Old 05-12-2008, 04:03 PM
edvwvw via OfficeKB.com
 
Posts: n/a
Re: Excel 2003 - VBA - SUMIF

This should give you a start point:

CODE VALUE RESULT INPUT
IMDA 10 320 COUNT IM
AAAA 20 DON’T COUNT
BBBB 30 DON’T COUNT
IMDA 40 COUNT
IMAA 50 COUNT
IMDA 60 COUNT
IMD1 70 COUNT
AAGH 80 DON’T COUNT
IMDA 90 COUNT
INDA 100 DON’T COUNT

CELL D2 SUMIF(C2:C11,"COUNT",A2:A11)
CELL E2 IF(LEFT(B2,LEN($F$2))=$F$2,"COUNT","DON’T COUNT")

I cannot format this so it is eay to read - I will explain

CODE column C VALUE column D (helper column E) INPUT coulmn F



edvwvw


Craig Brandt wrote:
>Here is a tough one:
>
>I have a table with rows of information including an ID Code. The ID code is
>made up of four characters, each meaning something distinct. I want to
>create a flexible reporting system where the user can specify which of these
>rows to include in the report. Up to here there have been no problems,
>example;
>
>Code IMDA specifies an account that is active, indicated by the "A". Most
>accounts are Active but there is also the possibility for it to be Inactive,
>in which case the Code would have been IMDI, for Inactive. To gather the Net
>Worth of these accounts, I simply look for the distinct code.
>
>SUMIF(A5:A1500,"IMDA",CW5:CW1500)
>
>SUMIF(A5:A1500,"IMDI",CW5:CW1500)
>
>Challenge:
>I would like to have the ability to use wildcards (+) in the Code to
>indicate that any character in that position should be considered a match.
>The above code would produce a report that has two cells showing all Active
>IMD accounts (IMDA), and all Inactive (IMDI).
>
>I would like to offer the user the ability to insert the wildcard by
>changing the code to be able to handle a Pseudo Code of IMD+ where the last
>character is inconsequential to a match. In the real world, this "+" could
>be in any position.
>
>Does anyone have any suggestions on how to proceed?
>
>Craig


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...l-new/200805/1

Reply With Quote
  #3 (permalink)  
Old 05-12-2008, 04:04 PM
edvwvw via OfficeKB.com
 
Posts: n/a
Re: Excel 2003 - VBA - SUMIF

edvwvw wrote:
>This should give you a start point:
>
> CODE VALUE RESULT INPUT
> IMDA 10 320 COUNT IM
> AAAA 20 DON’T COUNT
> BBBB 30 DON’T COUNT
> IMDA 40 COUNT
> IMAA 50 COUNT
> IMDA 60 COUNT
> IMD1 70 COUNT
> AAGH 80 DON’T COUNT
> IMDA 90 COUNT
> INDA 100 DON’T COUNT
>
>CELL D2 SUMIF(C2:C11,"COUNT",A2:A11)
>CELL E2 IF(LEFT(B2,LEN($F$2))=$F$2,"COUNT","DON’T COUNT")
>
>I cannot format this so it is eay to read - I will explain
>
>CODE column B VALUE column C Result column D (helper column E) INPUT coulmn F
>
>edvwvw
>
>>Here is a tough one:
>>

>[quoted text clipped - 27 lines]
>>
>>Craig


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...l-new/200805/1

Reply With Quote
  #4 (permalink)  
Old 05-12-2008, 05:48 PM
Ron Rosenfeld
 
Posts: n/a
Re: Excel 2003 - VBA - SUMIF

On Mon, 12 May 2008 09:30:30 -0500, "Craig Brandt" <brandtcraig@att.net> wrote:

>Here is a tough one:


>
>I would like to offer the user the ability to insert the wildcard by
>changing the code to be able to handle a Pseudo Code of IMD+ where the last
>character is inconsequential to a match. In the real world, this "+" could
>be in any position.
>
>
>
>Does anyone have any suggestions on how to proceed?
>
>Craig
>


The SUMIF text criteria uses the same wildcard tokens -- * or ? -- as does
other Excel functions that can use wild cards.

IMD? for a 4 character code starting with IMD and for which the 4th character
is irrelevant.

IMD* for any length code that starts with IMD
--ron
Reply With Quote
  #5 (permalink)  
Old 05-12-2008, 07:41 PM
Craig Brandt
 
Posts: n/a
Re: Excel 2003 - VBA - SUMIF - Thanks

Ron:

It never ceases to amaze me. Some things that look impossible, turn out to
be really simple solutions.

Thanks again,
craig


"Ron Rosenfeld" <ronrosenfeld@nospam.org> wrote in message
news:sssg245n7n77r7f5l44ts5nj75b0ih6jd2@4ax.com...
> On Mon, 12 May 2008 09:30:30 -0500, "Craig Brandt" <brandtcraig@att.net>

wrote:
>
> >Here is a tough one:

>
> >
> >I would like to offer the user the ability to insert the wildcard by
> >changing the code to be able to handle a Pseudo Code of IMD+ where the

last
> >character is inconsequential to a match. In the real world, this "+"

could
> >be in any position.
> >
> >
> >
> >Does anyone have any suggestions on how to proceed?
> >
> >Craig
> >

>
> The SUMIF text criteria uses the same wildcard tokens -- * or ? -- as does
> other Excel functions that can use wild cards.
>
> IMD? for a 4 character code starting with IMD and for which the 4th

character
> is irrelevant.
>
> IMD* for any length code that starts with IMD
> --ron



Reply With Quote
Reply

  { mindfrost82.com } > Gadget Corner > Tech Newsgroups > Microsoft > MS Office > Excel


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 04:14 PM.


Powered by vBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
© 1999-2008 mindfrost82.com v11.0


Sponsors:
Debt Consolidation | Loans | Personal Loans | Neopets Cheats, Games and Neopoints | Cadillac Palace Theatre Tickets



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114