+ Reply to Thread
Results 1 to 6 of 6

Wildcard Problem....

  1. #1
    Registered User
    Join Date
    12-27-2005
    Posts
    2

    Wildcard Problem....

    I work at an Insurance Agency and am having a problem with an Excel formula for our application log. Here is the formula that is returning a zero value to me:

    =SUMPRODUCT((B4:B200="Hertvik")*(J4:J200="PL*")*(E4:E200))

    Column B contains our different agencies. In this instance I want all policies with the "Hertvik" agency. Column J contains policy types (i.e. PL Auto, PL Home, CL BOP, etc.). I want to sum the numbers in column E for all of the policies with the Hertvik agency and start withe the policy type "PL". However, the * wildcard is not working. If I type in "PL Auto" instead of "PL*" it works fine. Is there a reason that the wildcard is not working?

    Thanks!

  2. #2
    Dave Peterson
    Guest

    Re: Wildcard Problem....

    =SUMPRODUCT(--(B4:B200="Hertvik"),--(left(J4:J200,2)="PL*"),(E4:E200))

    =sumproduct() likes to work with numbers.

    The -- converts True's and False's to 1's and 0's.

    JackH1976 wrote:
    >
    > I work at an Insurance Agency and am having a problem with an Excel
    > formula for our application log. Here is the formula that is returning
    > a zero value to me:
    >
    > =SUMPRODUCT((B4:B200="Hertvik")*(J4:J200="PL*")*(E4:E200))
    >
    > Column B contains our different agencies. In this instance I want all
    > policies with the "Hertvik" agency. Column J contains policy types
    > (i.e. PL Auto, PL Home, CL BOP, etc.). I want to sum the numbers in
    > column E for all of the policies with the Hertvik agency and start
    > withe the policy type "PL". However, the * wildcard is not working.
    > If I type in "PL Auto" instead of "PL*" it works fine. Is there a
    > reason that the wildcard is not working?
    >
    > Thanks!
    >
    > --
    > JackH1976
    > ------------------------------------------------------------------------
    > JackH1976's Profile: http://www.excelforum.com/member.php...o&userid=29922
    > View this thread: http://www.excelforum.com/showthread...hreadid=496164


    --

    Dave Peterson

  3. #3
    Domenic
    Guest

    Re: Wildcard Problem....

    Try...

    =SUMPRODUCT((B4:B200="Hertvik")*(LEFT(J4:J200,2)="PL")*(E4:E200))

    or

    =SUMPRODUCT(--(B4:B200="Hertvik"),--(LEFT(J4:J200,2)="PL"),E4:E200)

    The latter is somewhat more efficient.

    Hope this helps!

    In article <[email protected]>,
    JackH1976 <[email protected]>
    wrote:

    > I work at an Insurance Agency and am having a problem with an Excel
    > formula for our application log. Here is the formula that is returning
    > a zero value to me:
    >
    > =SUMPRODUCT((B4:B200="Hertvik")*(J4:J200="PL*")*(E4:E200))
    >
    > Column B contains our different agencies. In this instance I want all
    > policies with the "Hertvik" agency. Column J contains policy types
    > (i.e. PL Auto, PL Home, CL BOP, etc.). I want to sum the numbers in
    > column E for all of the policies with the Hertvik agency and start
    > withe the policy type "PL". However, the * wildcard is not working.
    > If I type in "PL Auto" instead of "PL*" it works fine. Is there a
    > reason that the wildcard is not working?
    >
    > Thanks!


  4. #4
    Ragdyer
    Guest

    Re: Wildcard Problem....

    Dave had a small typo.

    He really meant:

    =SUMPRODUCT(--(B4:B200="Hertvik"),--(LEFT(J4:J200,2)="PL"),(E4:E200))

    --
    Regards,

    RD

    ---------------------------------------------------------------------------
    Please keep all correspondence within the NewsGroup, so all may benefit !
    ---------------------------------------------------------------------------
    "Dave Peterson" <[email protected]> wrote in message
    news:[email protected]...
    > =SUMPRODUCT(--(B4:B200="Hertvik"),--(left(J4:J200,2)="PL*"),(E4:E200))
    >
    > =sumproduct() likes to work with numbers.
    >
    > The -- converts True's and False's to 1's and 0's.
    >
    > JackH1976 wrote:
    > >
    > > I work at an Insurance Agency and am having a problem with an Excel
    > > formula for our application log. Here is the formula that is returning
    > > a zero value to me:
    > >
    > > =SUMPRODUCT((B4:B200="Hertvik")*(J4:J200="PL*")*(E4:E200))
    > >
    > > Column B contains our different agencies. In this instance I want all
    > > policies with the "Hertvik" agency. Column J contains policy types
    > > (i.e. PL Auto, PL Home, CL BOP, etc.). I want to sum the numbers in
    > > column E for all of the policies with the Hertvik agency and start
    > > withe the policy type "PL". However, the * wildcard is not working.
    > > If I type in "PL Auto" instead of "PL*" it works fine. Is there a
    > > reason that the wildcard is not working?
    > >
    > > Thanks!
    > >
    > > --
    > > JackH1976
    > > ------------------------------------------------------------------------
    > > JackH1976's Profile:

    http://www.excelforum.com/member.php...o&userid=29922
    > > View this thread:

    http://www.excelforum.com/showthread...hreadid=496164
    >
    > --
    >
    > Dave Peterson



  5. #5
    Registered User
    Join Date
    12-27-2005
    Posts
    2
    Thanks a lot! That works!

  6. #6
    Dave Peterson
    Guest

    Re: Wildcard Problem....

    Thanks for the correction, RD.

    Ragdyer wrote:
    >
    > Dave had a small typo.
    >
    > He really meant:
    >
    > =SUMPRODUCT(--(B4:B200="Hertvik"),--(LEFT(J4:J200,2)="PL"),(E4:E200))
    >
    > --
    > Regards,
    >
    > RD
    >
    > ---------------------------------------------------------------------------
    > Please keep all correspondence within the NewsGroup, so all may benefit !
    > ---------------------------------------------------------------------------
    > "Dave Peterson" <[email protected]> wrote in message
    > news:[email protected]...
    > > =SUMPRODUCT(--(B4:B200="Hertvik"),--(left(J4:J200,2)="PL*"),(E4:E200))
    > >
    > > =sumproduct() likes to work with numbers.
    > >
    > > The -- converts True's and False's to 1's and 0's.
    > >
    > > JackH1976 wrote:
    > > >
    > > > I work at an Insurance Agency and am having a problem with an Excel
    > > > formula for our application log. Here is the formula that is returning
    > > > a zero value to me:
    > > >
    > > > =SUMPRODUCT((B4:B200="Hertvik")*(J4:J200="PL*")*(E4:E200))
    > > >
    > > > Column B contains our different agencies. In this instance I want all
    > > > policies with the "Hertvik" agency. Column J contains policy types
    > > > (i.e. PL Auto, PL Home, CL BOP, etc.). I want to sum the numbers in
    > > > column E for all of the policies with the Hertvik agency and start
    > > > withe the policy type "PL". However, the * wildcard is not working.
    > > > If I type in "PL Auto" instead of "PL*" it works fine. Is there a
    > > > reason that the wildcard is not working?
    > > >
    > > > Thanks!
    > > >
    > > > --
    > > > JackH1976
    > > > ------------------------------------------------------------------------
    > > > JackH1976's Profile:

    > http://www.excelforum.com/member.php...o&userid=29922
    > > > View this thread:

    > http://www.excelforum.com/showthread...hreadid=496164
    > >
    > > --
    > >
    > > Dave Peterson


    --

    Dave Peterson

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1