+ Reply to Thread
Results 1 to 3 of 3

Macro to copy and fill in cells

  1. #1
    Registered User
    Join Date
    05-06-2014
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    11

    Question Macro to copy and fill in cells

    Hello everybody,

    Got a small problem out here with macros and was hoping you might help. Please keep in mind my knowledge is close to 0, i only recorded some macros and managed to modify some details to better suit my needs, but nothing too complex.
    I'll try to explain in detail as much as i can.

    I'm using 3 sheets within one Excel file. 1st sheet (target) is called Offer, the 2nd one (source) is called Stock and there's a 3rd one that only contains a button to which i'll assign the final macro. Now, back to it.

    I need to copy from Stock to Offer contents of the entire column (basically there are a few more in Offer, so i need to copy each one and place it in a different part). I need to copy from ROW 2 and paste in ROW 6. The length of the document varies, as it's connected to the database (now i can have 3800 rows, in the next hour 3765). Previously i just added an X to row 4500 ( i don't expect to EVER have more than 4000 lines) and just copied from 2 to 4499 but it's weird to do so so any example would help.

    Second issue is, on the Offer sheet i have to fill a column with a certain value. Again, it needs to start from Row 6, and needs to be as long as the adjacent column. To get a better idea, i have for example 3800 price lines, so i need the column next to it to be filled with 3800 rows saying GBP (this will be a fixed value).

    Also, none of the codes above should exclude blank cells in the middle of the string.
    Last thing, seems some of the barcodes i have only have 12 digits, so i'll need to add a 0 in front of all shorter numbers to go up to 13 digits.
    Again, any help appreciated.

    I should be able to figure the rest by recording bits and pieces. The Save part is done already, i'm using

    Please Login or Register  to view this content.
    I needed it in XLSX format, not XLSM so that suits just fine. I might need to add hour and minute as well but i can sort it out (as i said, i can do some stuff on my own but this one got me to the bottom).


    Sorry for the long questions, i just tried to make it easier and describe as well as possible.
    Thanks for any help!

    Alex
    Last edited by alansidman; 05-06-2014 at 07:59 AM. Reason: code tags added

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,872

    Re: Macro to copy and fill in cells

    Code Tags Added
    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between
    Please Login or Register  to view this content.
    tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found at http://www.excelforum.com/forum-rule...rum-rules.html



    (Because you are new to the forum, I have added them for you today. Please take a few minutes to read all Forum Rules and comply in the future.)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    05-06-2014
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Macro to copy and fill in cells

    Hello again experts,

    No help out here ?
    Thanks,

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Auto copy cells including a cells Coloured background (colour fill)
    By rick.parry in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-06-2013, 04:51 AM
  2. Macro for ’Auto Fill’/Copy down x number of cells
    By Saturn in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-27-2010, 03:57 PM
  3. Copy cells within row containing green fill
    By munkee in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-18-2009, 09:02 AM
  4. Use data to copy/fill other cells.
    By Harv in forum Excel General
    Replies: 2
    Last Post: 05-11-2006, 05:22 PM
  5. How do I fill (copy) nonadjacent cells to adjacent cells?
    By BuckyGeorge in forum Excel General
    Replies: 2
    Last Post: 12-22-2005, 12:25 AM

Tags for this Thread

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