Results 1 to 8 of 8

Thread: Link a specific cell from new sheet to a Log Sheet Automatically.

  1. #1
    New Member
    Join Date
    Aug 2019
    Location
    United Arab Emirates
    Posts
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Lightbulb Link a specific cell from new sheet to a Log Sheet Automatically.

    I create a account Statement and Invoices Workbook File,
    First sheet is the account Statement, and after each sheet will be a new invoice.
    I want each time I add a new sheet as a new invoice, as Copy Paste, a specific data from a specific cells in that new invoice sheet will go automatically to the first blank or empty row in the statement sheet, without to link it one by one manually.
    How I can do that.
    I can send the file to see it.

  2. #2
    Board Regular DanteAmor's Avatar
    Join Date
    Dec 2018
    Location
    México
    Posts
    6,240
    Post Thanks / Like
    Mentioned
    71 Post(s)
    Tagged
    14 Thread(s)

    Default Re: Link a specific cell from new sheet to a Log Sheet Automatically.

    Upload your book to the cloud and share it to put the macro.
    Tell me which or which cells should be sent to the "account Statement" sheet

    You could upload a copy of your file to a free site such www.dropbox.com. Once you do that, mark it for 'Sharing' and you will be given a link to the file that you can post here. If the workbook contains confidential information, you could replace it with generic data.
    Regards Dante Amor

  3. #3
    New Member
    Join Date
    Aug 2019
    Location
    United Arab Emirates
    Posts
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Link a specific cell from new sheet to a Log Sheet Automatically.

    Quote Originally Posted by DanteAmor View Post
    Upload your book to the cloud and share it to put the macro.
    Tell me which or which cells should be sent to the "account Statement" sheet

    You could upload a copy of your file to a free site such www.dropbox.com. Once you do that, mark it for 'Sharing' and you will be given a link to the file that you can post here. If the workbook contains confidential information, you could replace it with generic data.
    Thanks for your reply
    Here is a link to the file,
    https://www.dropbox.com/s/4ll0src44y...Name.xlsx?dl=0

    Thanks

  4. #4
    Board Regular DanteAmor's Avatar
    Join Date
    Dec 2018
    Location
    México
    Posts
    6,240
    Post Thanks / Like
    Mentioned
    71 Post(s)
    Tagged
    14 Thread(s)

    Default Re: Link a specific cell from new sheet to a Log Sheet Automatically.

    But you didn't explain, which cells are taken from "Statement" and where they should be put in the new one.
    Regards Dante Amor

  5. #5
    New Member
    Join Date
    Aug 2019
    Location
    United Arab Emirates
    Posts
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Link a specific cell from new sheet to a Log Sheet Automatically.

    Quote Originally Posted by DanteAmor View Post
    But you didn't explain, which cells are taken from "Statement" and where they should be put in the new one.
    You can see the cells in the statement which is linked to the invoices
    Example are in invoice #1 and Invoice #2
    What I want is when I add Invoice #3 and more, same cells from invoices will go to the Statement

    And in details will be as follow:

    Invoice!H3 to Statement Column !A
    Invoice!E3 to Statement Column !B
    Invoice!G11 to Statement Column !C
    Invoice!G12 to Statement Column !E
    Invoice!I36 to Statement Column !I

    So it is a specific Cells from the Invoices, but going to find them places in the first empty row in a specific Column

    I am sure you understand what I need.

    Thanks for your concern

  6. #6
    Board Regular DanteAmor's Avatar
    Join Date
    Dec 2018
    Location
    México
    Posts
    6,240
    Post Thanks / Like
    Mentioned
    71 Post(s)
    Tagged
    14 Thread(s)

    Default Re: Link a specific cell from new sheet to a Log Sheet Automatically.

    Try this.

    Put the macro in a module, select the new invoice and run the macro.

    Code:
    Sub Fill_Statement()
      Dim sh As Worksheet, i As Long, f As Range
      Set sh = Sheets("Statement")
      
      If LCase(Left(ActiveSheet.Name, 7)) <> LCase("Invoice") Then
        MsgBox "This sheet is not an invoice"
        Exit Sub
      End If
      Set f = sh.Range("B:B").Find(Range("E3"), , xlValues, xlWhole)
      If Not f Is Nothing Then
        MsgBox "This invoice already exists"
        Exit Sub
      End If
      
      i = 19
      Do While sh.Cells(i, "A") <> ""
        i = i + 1
      Loop
      sh.Range("A" & i) = Range("H3")
      sh.Range("B" & i) = Range("E3")
      sh.Range("C" & i) = Range("G11")
      sh.Range("E" & i) = Range("G12")
      sh.Range("I" & i) = Range("I36")
      MsgBox "Registration added"
    End Sub
    Regards Dante Amor

  7. #7
    New Member
    Join Date
    Aug 2019
    Location
    United Arab Emirates
    Posts
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Link a specific cell from new sheet to a Log Sheet Automatically.

    My God
    You are AMAZING
    It works like magic

    Thanks Dante, you did a big help to me.

  8. #8
    Board Regular DanteAmor's Avatar
    Join Date
    Dec 2018
    Location
    México
    Posts
    6,240
    Post Thanks / Like
    Mentioned
    71 Post(s)
    Tagged
    14 Thread(s)

    Default Re: Link a specific cell from new sheet to a Log Sheet Automatically.

    Quote Originally Posted by hannakaram View Post
    My God
    You are AMAZING
    It works like magic

    Thanks Dante, you did a big help to me.
    I'm glad to help you. I appreciate your kind comments.
    Regards Dante Amor

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •