+ Reply to Thread
Results 1 to 5 of 5

Change formula that removes blanks in columns to rows

  1. #1
    Forum Contributor Big.Moe's Avatar
    Join Date
    03-15-2012
    Location
    Corea, Maine, USA
    MS-Off Ver
    Excel 2010
    Posts
    244

    Change formula that removes blanks in columns to rows

    I have found the formula below and have used it successfully to remove blanks in vertical ranges (columns). However, I now need that same formula to remove blanks in horizontal ranges (rows).

    Please Login or Register  to view this content.
    At the risk of the forum gurus chuckling at my rudimentary attempt, I have tried to adapt the formula to the attached sheet ("JAN" tab) and change the ranges of the formula to rows and used the "COLUMN" function instead of the "ROW" function.

    Please Login or Register  to view this content.
    Unfortunately, the core logic of the original formula is too complex and still escapes me, so I am going at it a little blindly. Am I going in the right direction, or is there another formula I should be looking at?
    Attached Files Attached Files

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Change formula that removes blanks in columns to rows

    Hi Big.Moe,

    If I understand what you are attempting, you want to return the numbers in row 8 starting at column X and to the right! If this is correct.

    =INDEX($X$8:$BH$8,SMALL(IF($X$8:$BH$8>0,COLUMN($X$8:$BH$8)-COLUMN($X$8)+1),COLUMNS($T$8:T8)))

    IMPORTANT
    • This is an array formula
    • Enter the formula >> press F2 then >> CTRL + SHIFT + ENTER
    • If entered correctly, the formula will be enclosed in {brackets}
    • Do not enter the {brackets} manually
    HTH
    Regards, Jeff

  3. #3
    Forum Contributor Big.Moe's Avatar
    Join Date
    03-15-2012
    Location
    Corea, Maine, USA
    MS-Off Ver
    Excel 2010
    Posts
    244

    Re: Change formula that removes blanks in columns to rows

    WOW! Thanks you so much Jeffrey. That was exactly it. I'd love to think I would of come up with that solution eventually, but I'm afraid my Excel chops aren't quite up to the task.....but I keep trying.

  4. #4
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Change formula that removes blanks in columns to rows

    Quote Originally Posted by Big.Moe View Post
    but I keep trying.
    And that's what it all about.

    You are very welcome and thanks for the rep/feedback.

  5. #5
    Forum Contributor Big.Moe's Avatar
    Join Date
    03-15-2012
    Location
    Corea, Maine, USA
    MS-Off Ver
    Excel 2010
    Posts
    244

    Re: Change formula that removes blanks in columns to rows

    Quick question: I changed the target cells to have numbers and text (i.e. 22VWR rather than just 22). The formula works well for the first non-blank cell, but returns nothing for the next non-blank cells. Is there a way to change the formula to accept this change?

    Edit #1: Hmmm, looks like the problem was not the change of values. The problem only occurs in the next cell using your formula.
    Edit #2: If I delete the equations in the target cells, then your formula works in all four summary cells. When I put the formulas back in, results go away. rang
    Edit #3: Solved the problem. Had to change the >0 to <>"".
    Last edited by Big.Moe; 01-16-2020 at 01:47 AM.

+ 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. Unique List without blanks that removes duplicate with oldest date
    By heweaver in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-12-2019, 01:59 PM
  2. Copy a formula and change rows not columns
    By knuckledownlacrosse in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-29-2019, 09:49 PM
  3. [SOLVED] Change formula that removes blank cells to also exclude certain text from output list.
    By Big.Moe in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 07-26-2018, 03:50 PM
  4. [SOLVED] Removes Duplicates Except Blanks macro
    By ScabbyDog in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 03-06-2013, 09:49 AM
  5. [SOLVED] Macro removes duplicates but Charts blanks - Help needed
    By agricola in forum Excel General
    Replies: 13
    Last Post: 09-03-2012, 05:54 PM
  6. Counting rows of blanks across certain columns
    By crossingboston in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 05-26-2005, 05:15 PM
  7. selecting all blanks in multiple columns, then deleting those rows
    By DSSdiva in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-12-2005, 10:06 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