+ Reply to Thread
Results 1 to 16 of 16

Copy data with count option

  1. #1
    Forum Contributor
    Join Date
    04-19-2015
    Location
    pakistan
    MS-Off Ver
    2013
    Posts
    335

    Copy data with count option

    Hello All
    I attached the sample book I required result as per sheet2 from sheet1.
    In sheet1, there are numbers in series in column B and count of those numbers is in column C!
    I required to copy numbers base the count of column C, one dialog box will appear to ask for choose count let say I put 5 in it than there is 11 five in column C that all will copy to next sheet in column A. Similarly, if I choose 10 than you can see there is 7 times 10 in column C than data will copy accordingly to next sheet in column A.
    RESERVED – BSD will come from column H of sheet1, it will not fix for all. Whatever in that column that will copy.
    These numbers will also copy to column A in sheet2 as I made sample.
    Sheet2 will not exist code will create it with required headers and I made sample for understanding! This sheet will create once if I required to run second option than only data will copy without creating new sheet!

    Gondal
    Attached Files Attached Files
    Last edited by gondal; 09-04-2019 at 01:52 AM.

  2. #2
    Forum Contributor
    Join Date
    04-19-2015
    Location
    pakistan
    MS-Off Ver
    2013
    Posts
    335

    Re: Copy data with count option

    Hello All
    can any one help. i edited the some requirement now!
    Gondal

  3. #3
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: Copy data with count option

    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    04-19-2015
    Location
    pakistan
    MS-Off Ver
    2013
    Posts
    335

    Re: Copy data with count option

    thank you soo much sir for you kind help!
    code is working only up to 14 number in dialog box, mean if i put 15 or larger number in dialog box sheet showing blank and if i run code and just cancel without entering any number in dialog box its take long time to close with error by hitting esc button,
    can it possible to sheet create only once , not every time with each run!
    Gondal
    Attached Files Attached Files

  5. #5
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: Copy data with count option

    OOps, a typo and a change the order of the lines
    Please Login or Register  to view this content.
    Last edited by jindon; 09-04-2019 at 04:34 AM.

  6. #6
    Forum Contributor
    Join Date
    04-19-2015
    Location
    pakistan
    MS-Off Ver
    2013
    Posts
    335

    Re: Copy data with count option

    sorry i haven't look you provided new code, thnx for this

    but sir i deleted all old sheets in WBK and run the code now its showing 400 error!

    Gondal
    Attached Files Attached Files
    Last edited by gondal; 09-04-2019 at 04:21 AM.

  7. #7
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: Copy data with count option

    Code has been updated again.

  8. #8
    Forum Contributor
    Join Date
    04-19-2015
    Location
    pakistan
    MS-Off Ver
    2013
    Posts
    335

    Re: Copy data with count option

    thnx you so much sir its working perfectly now!

    one little issue , if i cancel or close dialog box without entering the Number its not exiting, unless i hit esc from key board!

    Gondal

  9. #9
    Forum Contributor
    Join Date
    04-19-2015
    Location
    pakistan
    MS-Off Ver
    2013
    Posts
    335

    Re: Copy data with count option

    & i apology for this!

    "You must spread some Reputation around before giving it to jindon again."

    Gondal

  10. #10
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: Copy data with count option

    Insert one line in bold
    Please Login or Register  to view this content.

  11. #11
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: Copy data with count option

    Quote Originally Posted by gondal View Post
    & i apology for this!

    "You must spread some Reputation around before giving it to jindon again."

    Gondal
    That's really strange, I've never got rep point from you.

  12. #12
    Forum Contributor
    Join Date
    04-19-2015
    Location
    pakistan
    MS-Off Ver
    2013
    Posts
    335

    Re: Copy data with count option

    thnx sir

    i found one issue that i run this code on other data wbk its showing 5 numbers either i put 2 and 3 in dialog box,

    Gondal
    Attached Files Attached Files

  13. #13
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: Copy data with count option

    Change
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.

  14. #14
    Forum Contributor
    Join Date
    04-19-2015
    Location
    pakistan
    MS-Off Ver
    2013
    Posts
    335

    Re: Copy data with count option

    thnx you soo much sir for great help and time, your are the best!

    where should i put this line
    Please Login or Register  to view this content.
    Gondal

  15. #15
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: Copy data with count option

    Please Login or Register  to view this content.

  16. #16
    Forum Contributor
    Join Date
    04-19-2015
    Location
    pakistan
    MS-Off Ver
    2013
    Posts
    335

    Re: Copy data with count option

    thnx sir, perfectly solved now!

    Gondal

+ 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 data from Workbook 2 that matches option in Workbook 2
    By Simone Fick in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-09-2017, 08:28 AM
  2. Replies: 5
    Last Post: 06-02-2016, 11:02 AM
  3. [SOLVED] Copy multiple IF functions formula to Data Validation option
    By cell-dweller in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 11-18-2015, 05:01 AM
  4. [SOLVED] Copy data to another sheet a double click option vba
    By KK1234 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-22-2014, 06:49 PM
  5. Replies: 5
    Last Post: 05-12-2010, 01:29 PM
  6. How to: Count option occurances in lists
    By Bigbird in forum Excel General
    Replies: 2
    Last Post: 05-22-2008, 04:28 PM
  7. Replies: 2
    Last Post: 06-26-2007, 02:55 PM

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