Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You description is not very clear, but here is a guess. It assumes a
userform with 3 textboxes. User enters Personid in Textbox1, value1 in Textbox2, value2 in textbox3. Sheet1 has a list of PersonId's in column A starting in row1 and you want to place the values in Textbox2 and Textbox3 in columns B and C respectively in the same row as the matching personid Private Sub Commandbutton1_click() Dim rng as Range, rng1 as Range Dim res as Variant Dim Personid as String With Worksheets("Sheet1") set rng = .Range(.Cells(1,1), .Cells(1,1).End(xldown)) End With Personid = Textbox1.Text res = Application.match(PersonId, rng, 0) if not iserror(res) then set rng1 = rng(res) rng.offset(0,1).Value = Textbox2.Text rng.offset(0,2).Value = Textbox3.Text end if End if -- Regards, Tom Ogilvy "Pat Fern" wrote in message ... I need to gather information from users and have the information stored in a excel file on a sheet with 3 columns. That information is structured like this PERSONID - VALUE1 - VALUE2 What I would like to do with this information is have a button on another sheet which would look into the file and look for the corresponding ID take values 1 and 2 then paste them into the corresponding columns for the Person. Instead of the row been deleted this would need to be then moved into another sheet in case this needs to be checked afterwards. Any Ideas? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Move cell info and info in range of cells on new entry | Excel Discussion (Misc queries) | |||
move info from a spreadsheet into a ticker | Excel Discussion (Misc queries) | |||
Copy info into empty cells below info, until finds cell with new d | Excel Discussion (Misc queries) | |||
Move cell info and info in neighboring cell on new entry | Excel Discussion (Misc queries) | |||
Want to move several cells info to next available row on master sh | Excel Discussion (Misc queries) |