+ Reply to Thread
Results 1 to 21 of 21

Formula to populate columns with text

  1. #1
    Registered User
    Join Date
    06-21-2016
    Location
    Nowhere
    MS-Off Ver
    2010, 2016
    Posts
    79

    Lightbulb Formula to populate columns with text

    Hi,

    Is there a formula or a way that if i input a time allocation for so many months, it then populates the months in coloums?

    Thanks in advance

    M2BS

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Formula to populate columns with text

    Yes.

    Post a sample spreadsheet with expected results, remove any sensitive data, create a mockup example if necessary.
    Use the Go Advanced option at the bottom of the page then scroll down to Manage Attachments as the "paperclip" method does not work on this forum.
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Registered User
    Join Date
    06-21-2016
    Location
    Nowhere
    MS-Off Ver
    2010, 2016
    Posts
    79

    Re: Formula to populate columns with text

    ThankS, I'm not sure if a VBA would be better as the months will not always be the same.

    attached file.
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Formula to populate columns with text

    Apart from your descriptions in red (which must ultimately be changed to numbers) there's nothing in the spreadsheet to indicate that a time should be entered in a particular month.
    Something like a check box for each month so the total time can be divided into the chosen months.
    Last edited by Special-K; 08-23-2018 at 08:27 AM.

  5. #5
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Formula to populate columns with text

    Maybe something like this?
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    06-21-2016
    Location
    Nowhere
    MS-Off Ver
    2010, 2016
    Posts
    79

    Re: Formula to populate columns with text

    Ah sorry, the specified time allocation in cell c3 should populate in the cells that had the red. So in your file where the 12 and 6.66666667 is it should show the allocation from c3.

    Thanks for the file tho.

  7. #7
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Formula to populate columns with text

    well from what Special-K gave you and your description it sounds like what he gave you should still work. Just change the formula to this...
    =IF(D4="x",$C3,"")
    you still will need a helper row unless you want to use visual basic.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  8. #8
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Formula to populate columns with text

    Just change the formulas to

    =IF(D4="X",$C3,"")

  9. #9
    Registered User
    Join Date
    06-21-2016
    Location
    Nowhere
    MS-Off Ver
    2010, 2016
    Posts
    79

    Re: Formula to populate columns with text

    @Sambo kid - I don't mind the vba, would you be able to help with that?

    @Special-K thanks will try that.

  10. #10
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Formula to populate columns with text

    No, sorry, I don't have VBA skills. I think Special-K gave you your best option for using a formula.
    You could ask a moderator to move this post to the VBA section to get help there.

    EDIT: and honestly, I still think the VBA would need some way to recognize where to put the values so something like the helper row might still need to be employed.

  11. #11
    Registered User
    Join Date
    06-21-2016
    Location
    Nowhere
    MS-Off Ver
    2010, 2016
    Posts
    79

    Re: Formula to populate columns with text

    Thank you so much both

  12. #12
    Registered User
    Join Date
    06-21-2016
    Location
    Nowhere
    MS-Off Ver
    2010, 2016
    Posts
    79

    Re: Formula to populate columns with text

    Sorry, with the above, from the data used in the file, could you then take the results and make them appear on a new sheet?

    So you use like a data sheet with the helper file and then on the next sheet would be the output?

  13. #13
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Formula to populate columns with text

    Delete rows 4 and 6 on Sheet1 (the rows with Xs)

    Copy the sheet into a new sheet (Sheet2) so it's indentical to Sheet1

    On Sheet1 place Xs where you want the times to appear

    Change the formulas in Sheet2 to

    =IF(Sheet1!D3="X",Sheet1!$C3,"")

    Sheet 1 now has an X where you want the time to appear
    Sheet 2 is a copy of Sheet 1 but where the Xs are on Sheet 1 you should now have the times.

  14. #14
    Registered User
    Join Date
    06-21-2016
    Location
    Nowhere
    MS-Off Ver
    2010, 2016
    Posts
    79

    Re: Formula to populate columns with text

    Don't worry blonde moment. Thank you that works great


  15. #15
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Formula to populate columns with text

    this would be one way ...
    insert new tab, copy over your project info and times and dates but leave out the helper row.
    then use this vlookup =IFERROR(VLOOKUP($B3,Sheet1!$B$2:$J$6,COLUMN(C$1),FALSE),"") dragged across and down.
    Attached Files Attached Files

  16. #16
    Registered User
    Join Date
    06-21-2016
    Location
    Nowhere
    MS-Off Ver
    2010, 2016
    Posts
    79

    Re: Formula to populate columns with text

    Yes that works too thank you

  17. #17
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Formula to populate columns with text

    Glad that will work for you and you're welcome!
    And thank you for the reps!

  18. #18
    Registered User
    Join Date
    06-21-2016
    Location
    Nowhere
    MS-Off Ver
    2010, 2016
    Posts
    79

    Re: Formula to populate columns with text

    Thank you

  19. #19
    Registered User
    Join Date
    06-21-2016
    Location
    Nowhere
    MS-Off Ver
    2010, 2016
    Posts
    79

    Re: Formula to populate columns with text

    Urrrrrrrggg sorry me again, can the be added to the formula so that if the the cell is empty it shows 0 ?

  20. #20
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Formula to populate columns with text

    change the formula in D3 of sheet2 to this...
    =IF(VLOOKUP($B3,Sheet1!$B$2:D6,COLUMN(C$1),FALSE)="",0,VLOOKUP($B3,Sheet1!$B$2:D6,COLUMN(C$1),FALSE))
    then drag down and across and you'll have zeros in the empty cells.
    I changed this part too Sheet1!$B$2:D6 so that as you drag it toward the right and down it will keep indexing to cover more columns and rows.

  21. #21
    Registered User
    Join Date
    06-21-2016
    Location
    Nowhere
    MS-Off Ver
    2010, 2016
    Posts
    79

    Re: Formula to populate columns with text

    Hey,

    Thank you, for the above. Will try it out.

+ 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] Auto populate range of rows and columns with text based on absolute value
    By mojian in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-22-2017, 09:26 AM
  2. worksheet change event to populate formula for number of columns
    By nigelog in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-16-2017, 10:07 AM
  3. Populate combo with values from one column and text boxes from other columns
    By Tea_4_2 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-15-2016, 07:33 PM
  4. Data from 4 columns to populate into varied report - formula or VB?
    By Missy O in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-24-2013, 06:06 PM
  5. Need formula to populate text in anoher cell
    By mcbrownhouse in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-11-2012, 10:20 AM
  6. [SOLVED] Populate Listbox from 2 columns based on search keyword from text box
    By sivakumar123 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-05-2012, 12:22 AM
  7. INDEX/MATCH formula in VBA to populate text boxes
    By Amber_D_Laws in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 02-17-2006, 12:19 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