+ Reply to Thread
Results 1 to 12 of 12

Distribute column A to 26 columns of integer value

Hybrid View

  1. #1
    Registered User
    Join Date
    11-27-2014
    Location
    Bucharest
    MS-Off Ver
    2007
    Posts
    8

    Distribute column A to 26 columns of integer value

    Hello! I'm new here. I dont have any macro or VBA knowledge so I ask your help.

    I need to distribute values from column "E" to next 26 columns.
    Column E contains integer values (number of products), and I want to distribute them to 26 stores.
    If the number of products is not divisible by number of stores (26) the first stores have priority to receive the products remaining.
    Hope I made myself clear, I'm not a native englist speaker.

    Your help is highly appreciated.
    Thank you!

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,065

    Re: Distribute column A to 26 columns of integer value

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    Never use Merged Cells in Excel

  3. #3
    Registered User
    Join Date
    11-27-2014
    Location
    Bucharest
    MS-Off Ver
    2007
    Posts
    8

    Re: Distribute column A to 26 columns of integer value

    Thanks for quick answer.
    Here it is, in yellow is the column I need to divide.
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor
    Join Date
    08-04-2011
    Location
    UK
    MS-Off Ver
    Excel 2021
    Posts
    346

    Re: Distribute column A to 26 columns of integer value

    =IF(COLUMN(F$1)-5<=$E2-INT($E2/26)*26,INT($E2/26)+1,INT($E2/26))

    in E2 and copy both ways

  5. #5
    Registered User
    Join Date
    11-27-2014
    Location
    Bucharest
    MS-Off Ver
    2007
    Posts
    8

    Re: Distribute column A to 26 columns of integer value

    Thanks for the input AlanY, but the formula contains an error.
    I cannot do a reverse engineering so I can fix it, but I attach 2 printscreens.
    I assumed I have to enter it in F2....AE2, since the E column must remain unchanged. That is the column where I take the values to distribute.
    Attached Images Attached Images

  6. #6
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,065

    Re: Distribute column A to 26 columns of integer value

    Replace all , with ;

  7. #7
    Valued Forum Contributor
    Join Date
    08-04-2011
    Location
    UK
    MS-Off Ver
    Excel 2021
    Posts
    346

    Re: Distribute column A to 26 columns of integer value

    you're welcome.

    did you replaced the , with ; as zbor suggested to make it works?

  8. #8
    Registered User
    Join Date
    11-27-2014
    Location
    Bucharest
    MS-Off Ver
    2007
    Posts
    8

    Re: Distribute column A to 26 columns of integer value

    yes. I should have thought of that before crying for help again.....

  9. #9
    Valued Forum Contributor
    Join Date
    08-04-2011
    Location
    UK
    MS-Off Ver
    Excel 2021
    Posts
    346

    Re: Distribute column A to 26 columns of integer value

    work for me, see attached
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    11-27-2014
    Location
    Bucharest
    MS-Off Ver
    2007
    Posts
    8

    Re: Distribute column A to 26 columns of integer value

    IT WORKED!!

    Thank you both gentlemen! You saved my day.

    The key to human success is learning from each other.

    Have a great day.

  11. #11
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,065

    Re: Distribute column A to 26 columns of integer value

    Microsoft Excel 2013 and 2010 by default uses the system defined decimal separator.
    In Windows 8 and Windows 7 this option is defined under the Regional and Language Settings available under Control Panel.

    That means that some part of world (as UK or USA etc) use , as delimiter and some use ; in Excel (all Office actually) files depending on regional settings.

  12. #12
    Registered User
    Join Date
    11-27-2014
    Location
    Bucharest
    MS-Off Ver
    2007
    Posts
    8

    Re: Distribute column A to 26 columns of integer value

    usefull info! 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. [SOLVED] Macro to distribute data from one column into different columns alphabetically
    By terryhenderson in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 04-12-2013, 10:27 AM
  2. [SOLVED] Distribute values in columns based on match between two other columns
    By hydrgal in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-15-2013, 04:07 AM
  3. [SOLVED] Distribute the data from Single Column to multiple Columns
    By Novice_To_Excel in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 09-29-2012, 02:11 PM
  4. [SOLVED] VBA to distribute data in column into columns and rows
    By AWM1966 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-15-2012, 07:48 PM
  5. Distribute Columns over Rows
    By ziohausam in forum Excel General
    Replies: 3
    Last Post: 01-31-2009, 09:22 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