+ Reply to Thread
Results 1 to 7 of 7

devide numbers and duplicate one spesific cell number

  1. #1
    Forum Contributor
    Join Date
    08-06-2014
    Location
    iran
    MS-Off Ver
    2016
    Posts
    110

    devide numbers and duplicate one spesific cell number

    hi
    i want a macro code that devides numbers to 49 and then the number of (49) cell duplicate for the first number of next row. i have attached the excel file .the sheet number 2 is my data and the sheet 1 is the sheet that i want.
    Attached Files Attached Files
    Last edited by fakhteh; 11-20-2018 at 03:41 AM.

  2. #2
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: devide numbers and duplicate one spesific cell number

    Is this what you mean?
    Please Login or Register  to view this content.
    Any code provided by me should be tested on a copy or a mock up of your original data before applying it to the original. Some events in VBA cannot be reversed with the undo facility in Excel. If your original post is satisfied, please mark the thread as "Solved". To upload a file, see the banner at top of this page.
    Just when I think I am smart, I learn something new!

  3. #3
    Forum Contributor
    Join Date
    08-06-2014
    Location
    iran
    MS-Off Ver
    2016
    Posts
    110

    Re: devide numbers and duplicate one spesific cell number

    hi again
    MR JLGWhiz
    your code answer is perfect but i think just one number must be changed in all of the code
    maybe my example was not correct so i edit and attached another one(book3) in my post.
    please check it
    i appreciate your help

  4. #4
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: devide numbers and duplicate one spesific cell number

    Rather than keep changing your data base, just use the original example and try this modified code.
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    08-06-2014
    Location
    iran
    MS-Off Ver
    2016
    Posts
    110

    Re: devide numbers and duplicate one spesific cell number

    Hi Mr JLGWhiz
    please use your code in macro and see the result i think you can find that which lines of code must be correct
    i use your code and i understand that maybe it is better to use times of 49 for example 1*49 and then 2*49 for finding the number that must be duplicated and set for the end of previous row and also set at the beginning of next row .
    thank you so much

  6. #6
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: devide numbers and duplicate one spesific cell number

    If you are only using 49 columns, then only the first row can have 49 unique entries. After that it will be the last number of the previous row plus 48 new unique entries.
    Otherwise, the first row will be 49 columns and the remaining rows will be 50 columns (last number of previous row + 49 new unique numbers) with the last row being of whatever number of columns <= 50. So if you can explain how you want the column counts to end up, maybe I can get it to produce the results you want.

  7. #7
    Forum Contributor
    Join Date
    08-06-2014
    Location
    iran
    MS-Off Ver
    2016
    Posts
    110

    Re: devide numbers and duplicate one spesific cell number

    hi
    it was my fault. i apologize of you and every one.
    forgive me

+ 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. Macro to fill the cells for the number of times with the value I devide
    By asokaw in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-03-2014, 09:26 AM
  2. [SOLVED] Change cells value if begins with spesific number
    By elevisse in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-21-2012, 07:29 PM
  3. Devide by cell if two values are equal
    By Savan87 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-26-2012, 07:37 AM
  4. [SOLVED] Summing a spesific number of rows
    By Test123Test in forum Excel General
    Replies: 5
    Last Post: 04-22-2012, 10:19 AM
  5. How to find total and devide by the number of cells with data in them?
    By ivwshane in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-03-2010, 02:23 AM
  6. How to devide one text cell into two cells
    By Mula in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-09-2009, 07:32 AM
  7. How to find number of hours past a spesific time
    By MrHaugen in forum Excel General
    Replies: 1
    Last Post: 07-10-2006, 05:29 AM

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