+ Reply to Thread
Results 1 to 2 of 2

Excel 2007 : search data using wildcard and sum it

  1. #1
    Registered User
    Join Date
    06-03-2010
    Location
    Malaysia, KL
    MS-Off Ver
    Excel 2003
    Posts
    1

    search data using wildcard and sum it

    Hi All,

    I am having some difficulties on the task.
    I am suppose to allow the users to search a data, including wildcard and then it should gather all the values which matches the wildcard and sum it.
    Eg:
    A B
    1 Name Value
    2 Eddy 1.5
    3 George 2.3
    4 Max 1.0
    5 Eddy01 3.5
    6 Eddy02 2.2

    So, there will be a msg box to ask the user to input the name. When the user input the value like Eddy*, the excel should be able to recognized the wildcard and sum the value (1.5+3.5+2.2) and send out the output as 7.2

    Any idea how to make this work?

    Thanks.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: search data using wildcard and sum it

    Why do you need the MsgBox exactly ?

    Couldn't you just enter the name into a cell (?) and then use:

    =SUMIF(A:A,C1&"*",B:B)

    where C1 contains Eddy

    (if you do use VBA just use SUMIF within the code...)

+ 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