+ Reply to Thread
Results 1 to 13 of 13

collapsing a list with empty cells

  1. #1
    Forum Contributor
    Join Date
    09-23-2008
    Location
    Rhode Island
    MS-Off Ver
    Excel for Mac 2011 and 2007 on PC
    Posts
    265

    collapsing a list with empty cells

    i have a list that is one hundred rows long but each column has only 8 or 10 elements in it.

    i want to collapse the list to the length of the longest column of entries so it will end up being about 10 rows and bringing all the entries into those 10 rows. they do not have to keep relative alignment re rows, only columns.

    i can think of some clumsy ways to do this but i'm looking for a clever quick way.

    attached a sample. no i didn't. when i click on manage attachments this opens another window with nothing in it. don't know if the forum doesn't like my version of
    firefox or what.

    is there a way to paste a table into a post. it is relatively simple material without formulas.

    thanx.

    brian

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: collapsing a list with empty cells

    1) Click on a column of data
    2) Press F5 (Goto) and select SPECIAL...
    3) Click on BLANKS and then OK
    4) Now right-click on one of the selected blank cells and choose DELETE from the popup
    5) Shift Cells Up.


    Repeat with next column.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Contributor
    Join Date
    09-23-2008
    Location
    Rhode Island
    MS-Off Ver
    Excel for Mac 2011 and 2007 on PC
    Posts
    265

    Re: collapsing a list with empty cells

    1st 3 steps went just as advertised. but it only selects cells outside the table i pasted meaning that somehow, even thought they appear empty the cells are not BLANK.

    the forumula that populated this table inserted "" for an empty cell, i.e. a text string with nothing in it. Maybe that is not interpreted as BLANK.

    This was part of an IF function so maybe I can go back and put =BLANK() or something like that as the alternative value for the if funciton and then your method will work. . i'll try that, but if you or anyone have any ideas on how to get empty cells to respond to the BLANK query will appreciate it.

    thanks,

    brian

  4. #4
    Forum Contributor
    Join Date
    09-23-2008
    Location
    Rhode Island
    MS-Off Ver
    Excel for Mac 2011 and 2007 on PC
    Posts
    265

    Re: collapsing a list with empty cells

    Tested with the ISBLANK() function and the cells are not blank. i can't figure out what to use for an alternative return in my if function that results in a blank cell. i have copied the cells and pasted special as values only but they are still not blank even without the formulas. Nothing shows in the formula bar when i click on one of these cells after pasting values only.

    tried using various forms of BLANK() or =BLANK() as the return from one path of the IF function but get a NAME# error.

    thanks for hopefully telling me something obvious i should have thought of.
    frustrated in Rhode island

    brian

  5. #5
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: collapsing a list with empty cells

    No other ideas come to mind. Is this a recurring need or a one-off?

    Attach a sample workbook and I'll take a look directly. Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

  6. #6
    Forum Contributor
    Join Date
    09-23-2008
    Location
    Rhode Island
    MS-Off Ver
    Excel for Mac 2011 and 2007 on PC
    Posts
    265

    Re: collapsing a list with empty cells

    so i have a number of files that could be simplified this way. I could write some kind of subroutine in xml that could ask for the number of rows and could jump through them and if a value was greater than 0 transfer copy that value and paste it in a new array keeping track of how many values were in the array already. I just thought their might be some quick way to do this and the special selection of blanks seems appropos but i can't figure out how to make the empty cells register as blank?

    i'll see if i can do a sample file when i get home. I was clickon on "manage attachments". it opened another window but that window never got any content. i did it on this computer and i get thumbnail list of other attachments i have made in previous posts. so i'm assuming that the version of foxfire i'm running on my home computer doesn't talk to this function correctly. i kind of wish that simple stuff that used to work (all those existing uploaded files were uploaded from my home computer using the version of foxfire i still have) wasn't made to not work in order to accomodate new versions of who knows what, flash.

    still looking for how to blank as cell from an internal formula.

    thanks,

    brian

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

    Re: collapsing a list with empty cells

    After clicking on Manage Attachments, you need to click on Add Files on top right of that window. That will let you select a file from you computer. The thumbnails on manage attachment window are the one which you have previously attached.
    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.

  8. #8
    Forum Contributor
    Join Date
    09-23-2008
    Location
    Rhode Island
    MS-Off Ver
    Excel for Mac 2011 and 2007 on PC
    Posts
    265

    Re: collapsing a list with empty cells

    got the attachment to work.

    this should give you a general idea what i'm wotking with.

    brian
    Attached Files Attached Files

  9. #9
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,915

    Re: collapsing a list with empty cells

    see the attached file
    Attached Files Attached Files
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  10. #10
    Forum Expert
    Join Date
    03-28-2014
    Location
    Hyderabad,India
    MS-Off Ver
    Excel 2013
    Posts
    1,887

    Re: collapsing a list with empty cells

    Hi,

    Just an alternative
    You can even try another Array function also in Sheet1 (2)

    Punnam
    Attached Files Attached Files

  11. #11
    Forum Expert boopathiraja's Avatar
    Join Date
    07-12-2013
    Location
    Coimbatore,TamilNadu, India
    MS-Off Ver
    Excel 2007, 2013, 2016, 365
    Posts
    1,455

    Re: collapsing a list with empty cells

    Hi,

    Try it out with an Pivot table with helper column
    Attached Files Attached Files
    Click just below left if it helps, Boo?ath?

  12. #12
    Forum Contributor
    Join Date
    09-23-2008
    Location
    Rhode Island
    MS-Off Ver
    Excel for Mac 2011 and 2007 on PC
    Posts
    265

    Re: collapsing a list with empty cells

    got it. can you help me to understand how your formula for cells in the helper column:

    =COUNT(OFFSET($A$1,0,LOOKUP(10^10,B2:P2,$B$1:$P$1),ROW(A2),1))

    is accomplishing the row labeling that enables pivot table to do the job.

    obviously what it does is count occurences of entries in a column up to the point of entry in the row being labeled. that's beautiful. even though i know what it does,it isn't reverse engineering quickly in my mind.


    thanks,

    brian

  13. #13
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: collapsing a list with empty cells

    The area in yellow on the attached file is how I interpret your problem with solution.

    The formula used is the following which is entered with Ctrl + Shift + Enter then copied down and across.

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

+ 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. How do i create a collapsing/expanding list?
    By ktmduke in forum Excel General
    Replies: 1
    Last Post: 01-03-2012, 02:52 AM
  2. Collapsing Groups while the cells are protected
    By karaf in forum Excel General
    Replies: 2
    Last Post: 01-11-2009, 11:37 AM
  3. Remove empty cells from named list / validation list
    By Sp00k in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-28-2006, 10:45 AM
  4. [SOLVED] Empty Cells in validation List
    By Jasper in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-28-2005, 10:06 AM
  5. [SOLVED] Empty Cells in validation List
    By Jasper in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 01-24-2005, 09:12 AM

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