+ Reply to Thread
Results 1 to 3 of 3

countif() then list all values

  1. #1
    Registered User
    Join Date
    04-07-2008
    Posts
    30

    countif() then list all values

    I was wondering if we can do this using a formula instead of using filter (since I need to repeat the formulas)

    I have values in 1st column, then a user can select the value A1, B1 or C1.., then the formula would list out all the values based on the selection

    For example:

    Col 1 Col 2: (user pick B1)
    A1 B1 <--- want to list out all three B1
    B1 B1
    A1 B1
    B1
    A1
    B1
    C1
    C1
    A1
    C1
    A1

    (there are three B1 in the 1st column, so 2nd column lists out all three)

    Any thought?

    Thanks!

  2. #2
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229
    Something like
    =IF(ROW()>COUNTIF(A:A,"b1"),"","b1")
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  3. #3
    Registered User
    Join Date
    04-07-2008
    Posts
    30

    Talking

    Thanks a lot for your reply!

    The formula works, but the data/formula has to start at row 1? If I inserted a row or start the data at row 2, the count is off by one?

    It'd be perfect if I can start the data or formula at any row and leave rooms for column headings or for cell referencing.

    I've also tried the named range but that didn't help.

    =IF(ROW()>COUNTIF(Data,"b1"),"","b1")


    T.

    Edit:
    I was able to tweak the formula to start at any row I want by subtracting row() (ie, if I wanted to start at row 3):
    =IF(ROW()-2>COUNTIF(Data,"b1"),"","b1")

    Thanks again for your help! This board is awesome :D
    Last edited by tn80; 08-08-2008 at 12:16 AM.

+ 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