+ Reply to Thread
Results 1 to 9 of 9

List row numbers where cell values exist

  1. #1
    Registered User
    Join Date
    05-28-2010
    Location
    Sweden
    MS-Off Ver
    Excel 2003, 2007
    Posts
    5

    List row numbers where cell values exist

    Hi! I have a column where there are some empty cells. What I am trying to achive is to get a list with row numbers to all cells that are NOT empty (without using VBA). Is it possible?

    This is what I have:

    Row | Column A
    1 | X
    2 | [empty]
    3 | X
    4 | X
    5 | [empty]
    6 | X

    This is what I need:

    Row | Column A
    1 | 1
    2 | 3
    3 | 4
    4 | 6
    Last edited by maxald; 06-07-2010 at 08:24 AM.

  2. #2
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: List row numbers where cell values exist

    Try this

    in B1

    Please Login or Register  to view this content.
    Fill down

    Filter Column B for Non-blanks

    Copy and paste to desired location.

    Hope this helps.

    If you need any further information, please feel free to ask further

    However

    If this takes care of your needs, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED. It helps everybody!
    Also
    If you are satisfied by any members response to your problem please consider using the scales icon top right of thier post to show your appreciation.

  3. #3
    Registered User
    Join Date
    05-28-2010
    Location
    Sweden
    MS-Off Ver
    Excel 2003, 2007
    Posts
    5

    Re: List row numbers where cell values exist

    Thanks for reply! Problem is I need a list with no empty rows in between... thats the tricky part. Like a filtered list but with a formula so there will be no hidden rows.

    What I need (if row 2 and 5 is empty):

    Row | Column A
    1 | 1
    2 | 3
    3 | 4
    4 | 6

    Not:

    Row | Column A
    1 | 1
    2 |
    3 | 3
    4 | 4
    5 |

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: List row numbers where cell values exist

    do you want the row numbers or just the contents without blanks? if its the latter see http://www.cpearson.com/excel/noblanks.htm
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  5. #5
    Registered User
    Join Date
    05-28-2010
    Location
    Sweden
    MS-Off Ver
    Excel 2003, 2007
    Posts
    5

    Re: List row numbers where cell values exist

    Thanks for reply. Yes, I'd like to do exactly what that macro did, but Im not allowed to use macros so I am trying to do this with standard formulas/functions. I'd also want to avoid filtering. Row number would be just enough, from there I'll do it on my own.

    Suppose OFFSET is what I need to get things running, but I don't know how...
    Last edited by maxald; 06-03-2010 at 08:38 AM.

  6. #6
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: List row numbers where cell values exist

    use the first example ,the array formula with blanks/no blanks ranges you can either name the range as suggested or put in the actual range instead--no macro required

  7. #7
    Registered User
    Join Date
    05-28-2010
    Location
    Sweden
    MS-Off Ver
    Excel 2003, 2007
    Posts
    5

    Re: List row numbers where cell values exist

    That formula gives me the correct rownumber, yes, but then again I have a list with some empty cells. Problem is I need a formula that not only ignores the empty cells but go down the list and find the next cell thats not empty. Think of it like a filtering (its super easy that way) but with a fomula only. Maybe it's not possible, filtering sure is the way to go but I dont want that extra step.

    Please see my attachment for an example.
    Attached Files Attached Files
    Last edited by maxald; 06-04-2010 at 02:28 AM.

  8. #8
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: List row numbers where cell values exist

    you haven't tried !
    here it is done for your example
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    05-28-2010
    Location
    Sweden
    MS-Off Ver
    Excel 2003, 2007
    Posts
    5

    Re: List row numbers where cell values exist

    That's awsome, thanks! Now I just have to go figure how this is done...

+ 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