How to copy automatically from sheetx to sheet1

M

Macbet

Every day I have to write data to different worksheets.
So there is written as example in
sheet2 E80 value = 40.00
sheet3 E34 value = 25.50
sheet4 E78 value = 140.75

I would like to have this data automatically copied to
sheet1
Columns B2 = sheet2 E80
Columns B3 = sheet3 E34
Columns B4 = sheet4 E78

By the next daily entry the row will increase
And should copy
Columns B2 = sheet2 E81
Columns B3 = sheet3 E35
Columns B4 = sheet4 E79

Has somebody an idea, how to do this with excel?

Thanks in advance
macbet
 
B

Boris

Every day I have to write data to different worksheets.
So there is written as example in
sheet2 E80 value = 40.00
sheet3 E34 value = 25.50
sheet4 E78 value = 140.75

I would like to have this data automatically copied to
sheet1
Columns B2 = sheet2 E80
Columns B3 = sheet3 E34
Columns B4 = sheet4 E78

By the next daily entry the row will increase
And should copy
Columns B2 = sheet2 E81
Columns B3 = sheet3 E35
Columns B4 = sheet4 E79

Has somebody an idea, how to do this with excel?

Thanks in advance
macbet

Hi Macbet,

try this code:
---
Function GetLastCell(rRange As Variant) As Variant
GetLastCell = rRange.Cells(rRange.Rows.Count, 1).End(xlUp)
End Function
---

It will get you the last data of first column in given range, so if you use
it like this:

B2: =GetLastCell(Sheet2!E:E)
B3: =GetLastCell(Sheet3!E:E)
B4: =GetLastCell(Sheet4!E:E)

you will get your data.
You can substitute smaller range (I've used entire E columns) if you have
some another data below in those columns.

Regards,
B.
 
J

JE McGimpsey

One way:

B2: =INDEX(Sheet2!E:E, COUNTA(Sheet2!E:E))

assuming no blank rows in Sheet2!E:E (adjust the count as necessary if
there are blanks, e.g.:

=INDEX(Sheet2!E:E, COUNTA(Sheet2!E:E)+3)

if 3 blank rows.
 
M

Macbet

Thanks a lot
Have used the function from Boris
and implemented the formula from McGimpsey

it works !!
Thanks again
 
G

Guest

Hi,
I would like to do this same operation with a little difference. I need to
copy data
from sheets on various client machines to my server machine. How can I do
that?
 

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