+ Reply to Thread
Results 1 to 10 of 10

Distribute the number in integer form

  1. #1
    Registered User
    Join Date
    10-12-2015
    Location
    India
    MS-Off Ver
    2010
    Posts
    30

    Distribute the number in integer form

    Hi all,

    I have the following problem.

    I have a set of number(Batches) ranging from 1 to 12, not in particular order.
    I want to distribute the batches to different months with one batch every month


    I have close to 100 batches ranging from (1 to 12) to distribute among 12 months.
    Please note that the formula or macro must be applied to only selected cells but no the whole sheet
    Attached Images Attached Images

  2. #2
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,937

    Re: Distribute the number in integer form

    Assuming

    A1=1, A2=2 and so on
    then
    B1=IF(COLUMNS($B$1:B1)<=$A1,1,"") and drag towards the cell and down!!!
    If I helped, Don't forget to add reputation (click on the little star ★ at bottom of this post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)

  3. #3
    Registered User
    Join Date
    10-12-2015
    Location
    India
    MS-Off Ver
    2010
    Posts
    30

    Re: Distribute the number in integer form

    Hey Ankur,

    Thanks for the reply.

    I have the numbers in column A ranging from (1-12) more like the below pic. Please don't assume "A1=1,A2=2....A12=12"

    I have random numbersCapture.JPG

  4. #4
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,937

    Re: Distribute the number in integer form

    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 then scroll down to Manage Attachments to open the upload window.

  5. #5
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2021
    Posts
    5,982

    Re: Distribute the number in integer form

    Quote Originally Posted by Rajendra_kodavaty View Post
    I have random numbers
    Try this ...

    =RANDBETWEEN(1,12)

  6. #6
    Registered User
    Join Date
    10-12-2015
    Location
    India
    MS-Off Ver
    2010
    Posts
    30

    Re: Distribute the number in integer form

    Hey Ankur,

    I have attached current and desired files
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    10-12-2015
    Location
    India
    MS-Off Ver
    2010
    Posts
    30

    Re: Distribute the number in integer form

    Quote Originally Posted by Phuocam View Post
    Try this ...

    =RANDBETWEEN(1,12)
    Please go through the workbooks i have attached

  8. #8
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,937

    Re: Distribute the number in integer form

    tRY

    d3=IF(COLUMNS($D$3:D3)<=$C3,1,"")

  9. #9
    Forum Expert Crooza's Avatar
    Join Date
    10-19-2013
    Location
    Hunter Valley, Australia
    MS-Off Ver
    Excel 2003 /7/10
    Posts
    2,082

    Re: Distribute the number in integer form

    Try this in D3 and drag across and then down to fill the matrix

    =IF(MONTH("1/"&D$2&"/2016")<=$C3,1,"")
    Happy with my advice? Click on the * reputation button below

  10. #10
    Registered User
    Join Date
    10-12-2015
    Location
    India
    MS-Off Ver
    2010
    Posts
    30

    Re: Distribute the number in integer form

    It worked!! thanks a ton

+ 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. Distribute column A to 26 columns of integer value
    By drakosss in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 11-27-2014, 09:44 AM
  2. Distribute the value of number according to table
    By YasserKhalil in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-07-2014, 01:01 PM
  3. distribute a number in different coloums
    By devmaurya in forum Hello..Introduce yourself
    Replies: 2
    Last Post: 08-29-2014, 02:29 AM
  4. trying to distribute evenly between number of people
    By magleremm in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-11-2012, 09:41 PM
  5. Count the number of occurrences of an integer withing a larger integer
    By nnktran in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-26-2010, 01:04 PM
  6. Solving for X to distribute a number
    By gregburbidge in forum Excel General
    Replies: 4
    Last Post: 09-10-2009, 08:04 PM
  7. How to distribute a number into different categories
    By englephat in forum Excel General
    Replies: 3
    Last Post: 06-27-2007, 10:34 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