LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,942
Default fill a form with specific data

hi
this might work for you. it is worksheet code. right click the sheet tab
then click view code. paste the below code into the code window.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim r As Range
Dim ro As Range
Dim n As Long
n = Range("A1").Value
Set r = Sheets("Form").Range("B1")
Set ro = Sheets("Data").Range("A" & n)
If Intersect(Target, r) Is Nothing Then
r.Value = ro.Value
r.Offset(0, 1).Value = ro.Offset(0, 1).Value
r.Offset(0, 2).Value = ro.Offset(0, 2).Value
End If
End Sub

regards
FSt1

"Carla" wrote:

This is difficult to ask...
I want to create a form in excel on one tab with a spreadsheet of data in
another tab. On form tab I would like to simply type in the line # for which
I would like the data to populate from the data tab.

Form tab:
A1 type 1 (to retrieve data from line 1 on data tab)
A2 return Column A of Row 1 from data tab
A3 return Column B of Row 1 from data tab
A4 return Column C of Row 1 from data tab

Thank you all you wonderful forum helpers out there!
Carla

 
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
How can I collect specific data from cells in a fill-in form? Sherri at Quality Envelope Excel Discussion (Misc queries) 1 August 13th 08 03:06 PM
How do I fill a cell in a user form from a selection on same form? Terry Tipsy Excel Discussion (Misc queries) 4 June 11th 07 02:59 PM
Fill in form to type Item descrictions and costs and fill in funct cradino Excel Worksheet Functions 0 July 16th 06 08:44 PM
how to get a data form to fill you own exel sheet (was data-form erik van buijtenen Excel Worksheet Functions 2 May 30th 06 05:31 PM
Merge Excel data into specific form areas in a Word Doc duugg Excel Discussion (Misc queries) 1 April 21st 06 08:25 PM


All times are GMT +1. The time now is 07:00 AM.

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"