Results 1 to 7 of 7

repeat data on (odd/even) row

Threaded View

Baboo repeat data on (odd/even) row 11-06-2012, 05:03 PM
mike7952 Re: repeat data on (odd/even)... 11-06-2012, 07:26 PM
Baboo Re: repeat data on (odd/even)... 11-07-2012, 11:55 AM
mike7952 Re: repeat data on (odd/even)... 11-07-2012, 12:03 PM
Baboo Re: repeat data on (odd/even)... 11-07-2012, 12:23 PM
mike7952 Re: repeat data on (odd/even)... 11-07-2012, 12:58 PM
Baboo Re: repeat data on (odd/even)... 11-07-2012, 04:01 PM
  1. #1
    Registered User
    Join Date
    05-06-2011
    Location
    New York, US
    MS-Off Ver
    Excel 2007
    Posts
    25

    repeat data on (odd/even) row

    hi.

    i need to create a macro function to run a repeat cell data that pulling from a sheet in the same excel file.
    attached sample

    basically what i need to do is:

    write a macro:

    insert a new sheet and name it as "upload"

    on the "upload" sheet:

    A1 to be "ASN Header"
    A2 to be "ASN Shipment"
    A3 to be "ASN order"
    B1 - default and always to be as " 056481716"
    B2, C1 & C2 - I will manually input the data
    D1 - default and always to be as "Zoe"

    B3 = ASN!A2

    here comes the tricky part from below:

    on Column B (on every even cell) from:
    A4= shown as "ASN Item"
    B4 = ASN!G2 = as: 1038, but it needed to add one 0 in the front so it appears as 01038 in this sample file

    same on Column B (but, on every odd cell) from:
    A5 = shown as "ASN CASE CONTAINER"
    B5 = ASN!I2 = as: 12 in this sample file

    on Column C (on every odd cell) from:
    C5 = ASN!J2 = as: 104004437 in this sample file

    under this formula method, repeat down until it reach Total

    so, the theory is kind of like repeat alternately in even row/ odd row:

    on column A, every even row (starting from A4) = A4 shown as: "ASN Item", repeat A6 "ASN Item", repeat A8 "ASN Item".... continue and stop until it reaches Total shown on Column A

    on column A, every odd row (starting from A5) = A5 shown as: "ASN CASE Container", repeat A7 "ASN CASE Container", repeat A9 "ASN Item".... continue and stop until it reaches Total shown on Column A

    in this sample file, Total is on cell: A1379

    moving to Column B

    on column B, every even row (starting from B4) B4= ASN!G2, repeat B6 = ASN!G3, repeat B8 = ASN!G4 ... continue until and stop until it reaches Total on Col.A
    on column B, every odd row (starting from B5) B5= ASN!I2, repeat B7 = ASN!I3, repeat B9 = ASN!I4 ... continue until and stop until it reaches Total on Col.A
    on column C, every odd row (starting from C5) C5= ASN!J2, repeat C7 = ASN!J3, repeat C9 = ASN!J4... continue and stoop until it reaches Total on Co.lA

    stop until it reach Total (in this sample is A1379)

    I hope it makes sense, let me know if anything is confused.

    any help is appreciated !
    Attached Files Attached Files
    Last edited by Baboo; 11-07-2012 at 04:01 PM. Reason: solved

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