+ Reply to Thread
Results 1 to 3 of 3

Create List Based on a Given Condition

  1. #1
    Registered User
    Join Date
    05-14-2014
    MS-Off Ver
    Excel 2003
    Posts
    2

    Red face Create List Based on a Given Condition

    Hi guys in excelforum.

    My problem is this:

    I want to create a list based on a condition. For example, I want one of my cells to ask for X number of years, and so excel will create a list numbering 1 to X in a certain column. If X is 5, excel will then create a list from 1 to 5 in Column A; if X is 10, the list will be from 1 to 10; and so on and so forth. Then another cell (say Y) will require for me to input a certain value which will remain constant for the duration of the list stated in X. If say I want X to be 5, and I want Y to be 100, then column A will list numbers from 1 to 5 and the matching column B will place the value 100.

    row-column.png

    How can I do this? Thanks in advance.

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Create List Based on a Given Condition

    In A2 Cell

    =IF(ROW()<$A$1+2,ROW()-1,"")


    In B2 Cell

    =IF(A2="","",IF($B$1<>"",$B$1,""))

    Drag both the formula's down...

    Cells A1 and B1 Will be your input cells.

    In A1 Cell

    5

    In B1 Cell

    400


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: Create List Based on a Given Condition

    Assuming your X (number input) is in C1 and Y is in D1 (another input), then

    In A1

    Please Login or Register  to view this content.
    and then drag down.

    In B1

    Please Login or Register  to view this content.
    and then drag down.
    Attached Files Attached Files
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

+ 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. Create DataValidation List with two cell condition
    By turist in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-12-2014, 08:36 AM
  2. Create new sheets based on condition
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-24-2013, 01:35 AM
  3. [SOLVED] Create a list based on whether a condition was met
    By dkrzysik in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 01-02-2013, 08:08 AM
  4. create new workbook based on condition
    By kiranindia1986 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-21-2010, 12:05 AM
  5. Create an Automatic Pop-up Based on a Condition
    By chelseasikoebs in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-17-2009, 03:09 AM

Tags for this Thread

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