Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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


--
Andyd74
------------------------------------------------------------------------
Andyd74's Profile: http://www.excelforum.com/member.php...o&userid=34013
View this thread: http://www.excelforum.com/showthread...hreadid=537774

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default 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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Data storage/retrieval Adam Excel Discussion (Misc queries) 3 December 12th 07 01:29 PM
Data Retrieval pkpocket Excel Discussion (Misc queries) 2 October 2nd 07 12:50 AM
Data Retrieval bach Excel Programming 2 September 8th 05 03:43 PM
HTML data retrieval bspar Excel Programming 0 May 17th 04 08:07 PM
Troubles doing Data Retrieval from SQL Sauron[_10_] Excel Programming 6 April 6th 04 11:05 AM


All times are GMT +1. The time now is 04:27 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"