+ Reply to Thread
Results 1 to 7 of 7

Populate Cells According to Numeric Response

  1. #1
    Registered User
    Join Date
    01-30-2009
    Location
    South, Florida
    MS-Off Ver
    Excel 2003
    Posts
    3

    Populate Cells According to Numeric Response

    Hi,

    I've been trying some different combinations of the IF function and can't come up with a way to do the following...

    For example, if cell A1 has the number 3 entered in it, I'd like to populate cells B1,B2 and B3 with the text "True". In a nutshell, depending on the number entered in A1, I'd like to populate that number of cells in column B.

    Perhaps I'm oversimplifying this and it's not even possible.

    Any ideas, greatly appreciated.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Populate Cells According to Numeric Response

    In B1: =IF(ROW()>$A$1,"",TRUE) copied down as far as you want
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988

    Re: Populate Cells According to Numeric Response

    Or with code.


    Right click sheet tab > select view code > paste in the below

    Please Login or Register  to view this content.
    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Populate Cells According to Numeric Response

    From PM:
    I tried the IF statement you sent me but it is not quite what I am looking to accomplish. When I enter any number in cell A1, it only places the text "True" in cell B1 and not the number of cells I entered in A1. So if I entered the number 2 in A1, the output should look something like...

    2 True
    True
    See attached... you need to copy the formula down the column...
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    01-30-2009
    Location
    South, Florida
    MS-Off Ver
    Excel 2003
    Posts
    3

    Talking Re: Populate Cells According to Numeric Response

    Sorry, I missed something... When I wanted to add the text "True" to each of the cells in Column B, the field needed to be unique. I'd just like to append the number of results to "True" text. So if A1 is 2, then Cells B1 and B2 should be "True0" and "True1" and so on abd so forth, depending on the the number entered in A1.

    Thanks.

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Populate Cells According to Numeric Response

    Change formula in B1 to:

    =IF(ROW()>$A$1,"",TRUE&ROW()-1)

    and copy it down.

  7. #7
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988

    Re: Populate Cells According to Numeric Response

    Code way

    Please Login or Register  to view this content.
    VBA Noob

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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