[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 196
  • Last Modified:

Copiyng From one sheet to the other (excel)

Hi everyone,

I have a issue:

In SheetA I have:

Cell A1 = bla bla
Cell F2 = bla bla
Cell G3 = bla bla

Is there any code that can help me to bring the contents of these cells and copy them to

Sheet B

A1 = Sheet cell 1A
B1 = Sheet cell F2
C1 = Sheet cell G3. Because on sheet A this cells will be refreshed cotiniously so I was trynig to insert a commandclick nammed save that every time the user click on the command cotton the contents of these cells should be added on the next sheet in a row and the next time the contents of sheet a should be added again in sheet B but on the next row and so on.

Resume: In sheet a I have: |John | Frederick| class 1b| this should be copied on the second row of sheet b then when I click on the command botton next time will have
|Maurice| Antonius | class 5d| and so on so sheet 2 will be creating lika a sort of list with multiple rows.

Please if anyone can help me I will higly apreciate it .

Thanks Regards

Theo  
0
NEW_INDIA
Asked:
NEW_INDIA
2 Solutions
 
scrathcyboyCommented:
Do this manually, or automated?
For manual, you just highlight the 3 separate cells you want holding down control key.  then click on new DB tab, and set cursor to A1 and do paste -- three cells copy in sequentially, as you want.

For automated?  Have to write simple excel command copy A1 F2 G3 table 1 to A1 B1 C1 table 2, and you are done.  If you dont know what cells are to be, then have to write a complex routine to search for data in cells, and this very tough to do.
0
 
EarnBrzCommented:
write this in an module and then call it with your button.
 
Function sheetAUpdate
Dim ILastrow As Integer
On Error Resume Next
    ILastrow = Sheets("B").Cells.Find(What:="*", _
      SearchDirection:=xlPrevious, _
      SearchOrder:=xlByRows).Row
      ILastrow = ILastrow + 1
Sheets("B").Cells(ILastrow, 1) = Sheets("A").Cells(1, 1)
Sheets("B").Cells(ILastrow, 2) = Sheets("A").Cells(2, 6)
Sheets("B").Cells(ILastrow, 3) = Sheets("A").Cells(3, 7)
On Error GoTo 0
End Function
regards Stefan
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now