+ Reply to Thread
Results 1 to 6 of 6

How can i copy cells as this orders?

  1. #1
    Registered User
    Join Date
    01-17-2021
    Location
    Australia
    MS-Off Ver
    2019
    Posts
    25

    How can i copy cells as this orders?

    i have a lot of data and need to put it like this example . I have two column A , B and need to copy A1 in Column C with value in B2 with the rest of column B which will have 10 value .. then repeat again until i finish
    at the last row will be `A3` will be start with `B4 until B10` then `A4` with `B5 until B10` and so on .. until i finish and got `A9` with `B10`
    Please Login or Register  to view this content.
    the values of A10 and B1 will not be used
    i attached an example for what i want .. but if it is possible can i do it with formula not VBA ? i searched for how to use index and offset but couldn't get the right result >>
    Attached Files Attached Files
    Last edited by hassan7; 01-23-2021 at 10:32 AM.

  2. #2
    Forum Expert
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    2,103

    Re: How can i copy cells as this orders?

    Give this code a try

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    01-17-2021
    Location
    Australia
    MS-Off Ver
    2019
    Posts
    25

    Re: How can i copy cells as this orders?

    thanks for replying. I tried VBA but took a long time to finish as I have 2000 values. I want a formula to drag it down to be faster

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,025

    Re: How can i copy cells as this orders?

    I doubt if you will get a faster formula. I can generate the column A values with a formula... but can't yet get the column B values.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,025

    Re: How can i copy cells as this orders?

    Well, for what it's worth, here is a formula. In D2, a Helper copied down:

    Formula: copy to clipboard
    Please Login or Register  to view this content.



    It will take some time to calculate on a big dataset... Hence you may prefer VBA!! Then in E2, copied down:

    =IF(F2="","",INDEX($A$2:$A$7,D2))

    and in F2, copied down:

    =IFERROR(INDEX($B$3:$B$8,COUNTIF($D$2:D2,D2)+D2-1),"")

    it might be slow... well, it WILL be slow.
    Attached Files Attached Files

  6. #6
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,078

    Re: How can i copy cells as this orders?

    Another way with VBA
    Please Login or Register  to view this content.
    This takes under 1second for 1000 values.
    That said if you have 2000 values it will fail, as by reckoning that's 1.999 million rows.

+ 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. [SOLVED] Copy outstanding orders to another sheet, removing once they are fulfilled
    By aglawrence in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-26-2017, 12:06 PM
  2. Copy outstanding orders to another sheet, removing once they are fulfilled
    By aglawrence in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 10-26-2017, 07:05 AM
  3. Replies: 1
    Last Post: 05-10-2017, 12:11 PM
  4. [SOLVED] Apply rate1 to the 2 highest orders and rate2 to all other orders
    By Aland2929 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-09-2016, 01:03 PM
  5. Find Each Days Orders by Associate ID, input into Master Orders COmpleteWorksheet
    By bbell2219 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-09-2016, 02:14 AM
  6. Help calculating monthly orders depending on cumulative orders to date
    By nats2412 in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 02-03-2015, 03:18 AM
  7. Create orders log and monthly report for all orders
    By adfo in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-20-2013, 09:39 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