Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Populate a form with data from a range


I need to populate the fields of a form with data from a range when the
user selects a particular entry from a combo box. Using the selection
from the combo box, this routine will find that value in column A of
another worksheet in the file and populate all the other fields on the
form with data in that row.

Any ideas?


--
randallwilkins
------------------------------------------------------------------------
randallwilkins's Profile: http://www.excelforum.com/member.php...o&userid=35054
View this thread: http://www.excelforum.com/showthread...hreadid=553375

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 94
Default Populate a form with data from a range

Use VLOOKUP for this

say your combobox is in A1

=:VLOOKUP(lookup_value,table_array,col_index_num,r ange_lookup)
choose for lookup_value A1
table array, the table of dat you are looking on, eg, Sheet2!A:E
col_index num, choose the distance from the value you are looking up, 1
for the same column, 2 for column B:B, acroos the rows etc.
range_lookup needs to be 0 if you are looking for exact match.

change the col_index num to populate as many fields as you require

somethinglikeant



randallwilkins wrote:
I need to populate the fields of a form with data from a range when the
user selects a particular entry from a combo box. Using the selection
from the combo box, this routine will find that value in column A of
another worksheet in the file and populate all the other fields on the
form with data in that row.

Any ideas?


--
randallwilkins
------------------------------------------------------------------------
randallwilkins's Profile: http://www.excelforum.com/member.php...o&userid=35054
View this thread: http://www.excelforum.com/showthread...hreadid=553375


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 94
Default Populate a form with data from a range

Use VLOOKUP for this

say your combobox is in A1

=:VLOOKUP(lookup_value,table_array,col_index_num,r ange_lookup)
choose for lookup_value A1
table array, the table of dat you are looking on, eg, Sheet2!A:E
col_index num, choose the distance from the value you are looking up, 1
for the same column, 2 for column B:B, acroos the rows etc.
range_lookup needs to be 0 if you are looking for exact match.

change the col_index num to populate as many fields as you require

somethinglikeant



randallwilkins wrote:
I need to populate the fields of a form with data from a range when the
user selects a particular entry from a combo box. Using the selection
from the combo box, this routine will find that value in column A of
another worksheet in the file and populate all the other fields on the
form with data in that row.

Any ideas?


--
randallwilkins
------------------------------------------------------------------------
randallwilkins's Profile: http://www.excelforum.com/member.php...o&userid=35054
View this thread: http://www.excelforum.com/showthread...hreadid=553375


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Populate a form with data from a range


I am using VB in Excel. This is the code for one of the fields:

Private Sub txtOilGuage_Change()

End Sub

I want to lookup a well name that was picked in a combobox, look for
that well on another worksheet, and populate all the other fields in
the form with data from that row.

Find the well, look in each of the columns across the row and put the
value in the respective field on the form.


--
randallwilkins
------------------------------------------------------------------------
randallwilkins's Profile: http://www.excelforum.com/member.php...o&userid=35054
View this thread: http://www.excelforum.com/showthread...hreadid=553375

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
From a Data Range DoubleClick on a cell to populate elsewhere KalliKay Excel Discussion (Misc queries) 1 May 6th 09 06:05 PM
Populate an order form with Data Les Linton Excel Worksheet Functions 0 January 16th 08 02:13 AM
QUERY data range to populate separate worksheet? Greg Purnell[_2_] Excel Worksheet Functions 3 April 5th 07 01:49 PM
How to enter data in one form & populate several others w/same. cmcpsych Excel Worksheet Functions 3 October 13th 06 01:45 AM
Transfer data to form from Excel range upon loading of form. Rob Crawford Excel Programming 2 October 24th 05 03:59 PM


All times are GMT +1. The time now is 07:20 PM.

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

About Us

"It's about Microsoft Excel"