Search table, data retrieval

  • Thread starter Thread starter Andyd74
  • Start date Start date
A

Andyd74

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
 
Private Sub CommandButton1_Click()
Range("B9").Value = Evaluate("your sumproduct formula")
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top