+ Reply to Thread
Results 1 to 7 of 7

wild card with if logical function

  1. #1
    Registered User
    Join Date
    05-29-2006
    Posts
    75

    wild card with if logical function

    hi members,

    i need help on how to use wild cards(*/?) with if logical function.

    please provide me example.

  2. #2
    Forum Contributor
    Join Date
    01-18-2005
    Location
    Auckland New Zealand
    MS-Off Ver
    Office Professional 2007
    Posts
    295
    It's better if you tell us more about what you want to do; then someone may think of ways to solve your problem. I don't know of any wildcards with IF functions, but something I DO know may be just what your problem needs.

    Regards
    mike
    Last edited by Mikeopolo; 06-01-2006 at 03:42 AM.

  3. #3
    Registered User
    Join Date
    05-29-2006
    Posts
    75

    problem

    thankyou for reply here is my problem

    A1:A10 contains different jobnumbers in that format 32/2240,32/2425,32/4040 and so on and B1:B10 contains amount.

    job code 32/4040 first two diget for budget head(32) second for expence(40)

    third for location(40).

    in cell C1:c10 i just want to show particular location amount if there would have been wild cards i could get that by using following format

    A1:A10=32/??40 or A1:A10=32/??25 and so forth how can i get that result.

  4. #4
    Forum Contributor
    Join Date
    01-18-2005
    Location
    Auckland New Zealand
    MS-Off Ver
    Office Professional 2007
    Posts
    295
    OK, here's one way:

    With data as you describe, in range A1:J2,
    and with row 1 A:J named jobs
    and with row 2 A:J named data

    in K2 type:

    =SUMPRODUCT((LEFT(jobs,2)="32")*(RIGHT(jobs,2)="40")*(data))

    The values of 32 and 40 could be stored outside this cell; say they are held in L2 and M2, then the formula can be written:

    =SUMPRODUCT((LEFT(jobs,2)=TEXT(L2,"0"))*(RIGHT(jobs,2)=TEXT(M2,"0"))*(data))

    Hope this is helpful

    Regards
    Mike

  5. #5
    Toppers
    Guest

    Re: wild card with if logical function

    Is this acceptable?

    =SUMPRODUCT(--(RIGHT(A1:A10,2)="40"),--(B1:B10))

    "b166er" wrote:

    >
    > thankyou for reply here is my problem
    >
    > A1:A10 contains different jobnumbers in that format
    > 32/2240,32/2425,32/4040 and so on and B1:B10 contains amount.
    >
    > job code 32/4040 first two diget for budget head(32) second for
    > expence(40)
    >
    > third for location(40).
    >
    > in cell C1:c10 i just want to show particular location amount if there
    > would have been wild cards i could get that by using following format
    >
    > A1:A10=32/??40 or A1:A10=32/??25 and so forth how can i get that
    > result.
    >
    >
    > --
    > b166er
    > ------------------------------------------------------------------------
    > b166er's Profile: http://www.excelforum.com/member.php...o&userid=34912
    > View this thread: http://www.excelforum.com/showthread...hreadid=547358
    >
    >


  6. #6
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996
    b166er

    Try this:

    This formula sums the Col_B values where Col_A begins with "32/" and ends with "40":

    =SUMIF(A1:A10,"32/*40",B1:B10)

    Does that help?

    Regards,
    Ron

  7. #7
    Forum Contributor
    Join Date
    01-18-2005
    Location
    Auckland New Zealand
    MS-Off Ver
    Office Professional 2007
    Posts
    295
    Nice method Ron, thanks for sharing it!

    Mike

+ 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