Looking up data in different sheet

K

Ken

Hi Group,
Maybe another dumb question from a noob, but I would like to be
able to enter data from selected cells in another worksheet when I
enter on sheet1....I know I could go to the second worksheet, select
the cell where I want the data entered and insert =, go back to sheet
1 select the cell whose data I want entered, and press enter, etc,
etc.,....the question is: how would you go about writing a function,
or VBA, that would do it automatically as you type in data on sheet1,
without having to go to sheet2 and doing the = everytime??....as it is
now, I can only do one line at a time, then repeat the = process each
time to change the cell reference, which is a very slow process...I
know the answer is probably very simple, but I don't have the
knowledge or expertise to make it so...any help would be very greatly
appreciated, as it always is...
Ken
 
D

Don Guillett

Right click sheet tab>view code>insert this. You may want to restrict to a
certain range or column.

Private Sub Worksheet_Change(ByVal Target As Range)
Set ds = Sheets("sheet7")
lr = ds.Cells(Rows.Count, "a").End(xlUp).Row + 1
Target.Copy ds.Cells(lr, "a")
End Sub
 
K

Ken

Right click sheet tab>view code>insert this. You may want to restrict to a
certain range or column.

Private Sub Worksheet_Change(ByVal Target As Range)
Set ds = Sheets("sheet7")
lr = ds.Cells(Rows.Count, "a").End(xlUp).Row + 1
Target.Copy ds.Cells(lr, "a")
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software





- Show quoted text -

Hi Don,
Thank you for your quick response! You are right, I do need to
restrict to certain cols and ranges....what I have is a sheet named
JobLogEntry, columns A thru T, with data entered in all cells on a
particular line....I need to copy the data from Col A (selected line
cell), to a sheet named Shipping, cell B:3; Col H, JobLogEntry,
selected cell, to cell B:5, Shipping, etc, etc with only a total of 6
entries from the 20 entries on JobLogEntry to Shipping sheet...and
just by selecting a line that has already been filled out, the info
from that line would appear on Shipping sheet....would that be too
much to try to do?? Like I said, I do ask some dumb questions
sometimes! Thanks for any help because I do appreciate it!
Ken
 
D

Don Guillett

Pls top post as it is easier, for me, to read.
Certainly doable if I understood what you want. Send a workbook to the
address below, if desired.
 

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

Top