+ Reply to Thread
Results 1 to 3 of 3

Filling empty cells with the right data from another sheet

  1. #1
    Forum Contributor
    Join Date
    03-16-2009
    Location
    NC
    MS-Off Ver
    Office 2016
    Posts
    164

    Filling empty cells with the right data from another sheet

    Good morning!

    I got my invoice and my journal. Once I finish my invoices I send all to the journal, but I am having a little problem.... Here is my code

    Please Login or Register  to view this content.
    Sometimes with the invoice not all the rows that I am copying have items. Therefore, when it is pasted into the journal, I may only have 2 lines, but the invoice number ends up only in the first blank row. I have to change it manually.
    Is there a way that I could do it automatically. In other words, everytime I paste however many lines, I also want to paste the same amount of invoice numbers.

    Thanks for the help!
    Last edited by sentinela; 06-26-2009 at 05:56 PM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Filling empty cells with the right data from another sheet

    1) The invoice # is being pasted into column A, yes?
    2) So, add a variable to determine what the current lastrow of datais in the Journal (based on column F since you just pasted data there) , then copy the invoice number into the whole range until it fills the empty rows.
    Please Login or Register  to view this content.
    Last edited by JBeaucaire; 06-26-2009 at 12:35 PM.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Contributor
    Join Date
    03-16-2009
    Location
    NC
    MS-Off Ver
    Office 2016
    Posts
    164

    Re: Filling empty cells with the right data from another sheet

    JB

    Thank you very much for your reply...

    That works great! You have saved a lot of time just coping and pasting!

    Thanks again!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1