+ Reply to Thread
Results 1 to 2 of 2

Search table, data retrieval

  1. #1
    Registered User
    Join Date
    05-01-2006
    Posts
    16

    Search table, data retrieval

    I am trying to retrieve data from a table on the push of a search button where the selection is based on at least 2 criteria being selected and then outputting this data in another cell. I.e. I want to retrieve the total value from one column in the table where the "name" is "Andy" and the "age" is "25".

    I have this working using a normal SUMPRODUCT statement but i want this to happen on the click of a button. So Can someone suggest some VBA code that would allow me to do this.

    Thanks

  2. #2
    Tom Ogilvy
    Guest

    RE: Search table, data retrieval

    Private Sub CommandButton1_Click()
    Range("B9").Value = Evaluate("your sumproduct formula")
    End Sub

    --
    Regards,
    Tom Ogilvy


    "Andyd74" wrote:

    >
    > I am trying to retrieve data from a table on the push of a search button
    > where the selection is based on at least 2 criteria being selected and
    > then outputting this data in another cell. I.e. I want to retrieve the
    > total value from one column in the table where the "name" is "Andy" and
    > the "age" is "25".
    >
    > I have this working using a normal SUMPRODUCT statement but i want this
    > to happen on the click of a button. So Can someone suggest some VBA code
    > that would allow me to do this.
    >
    > Thanks
    >
    >
    > --
    > Andyd74
    > ------------------------------------------------------------------------
    > Andyd74's Profile: http://www.excelforum.com/member.php...o&userid=34013
    > View this thread: http://www.excelforum.com/showthread...hreadid=537774
    >
    >


+ 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