+ Reply to Thread
Results 1 to 6 of 6

Avoid nested IF statement and bring columns together

  1. #1
    Registered User
    Join Date
    08-13-2012
    Location
    South Africa
    MS-Off Ver
    Excel 2010
    Posts
    19

    Avoid nested IF statement and bring columns together

    Hi everyone,

    I'm having a bit of difficulty trying to summarise a table of data.

    I've attached the workbook to make the problem easier to understand.

    Basically I want to be able to select an option from the drop down box which populates the table in the red box. My formula's are such that where there are zeroes in the main data, the cell in the red box must be left blank and there must be no column heading. That is all working correctly. The problem is that I would then like to bring the columns altogether so that there are no blanks or zero values (like the green box in the example). I also cannot use nested IF statement because there are more than 7 columns. Please help!!

    Thank you in advance.

    excelexample1.xlsx

  2. #2
    Forum Contributor
    Join Date
    09-29-2011
    Location
    Kolkata, India
    MS-Off Ver
    Excel 2003/2007
    Posts
    182

    Re: Avoid nested IF statement and bring columns together

    Hi,

    You are using 2010. it will support more than 7 IF. So please try again with multiple IF.

  3. #3
    Registered User
    Join Date
    08-13-2012
    Location
    South Africa
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: Avoid nested IF statement and bring columns together

    Thank you for the quick reply taps. I will give it a try and then report back.

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Avoid nested IF statement and bring columns together

    A couple of other ways...

    1.

    Use this formula in C13:

    Please Login or Register  to view this content.
    confirmed with CTRL+SHIFT+ENTER not just ENTER and copied across 11 columns.

    Then in C14:

    Please Login or Register  to view this content.
    confirmed with just ENTER and copied across 11 columns.

    or

    2.

    Add helper row at C8:

    Please Login or Register  to view this content.
    copied across.

    Then at C13:

    Please Login or Register  to view this content.
    copied across

    and at C14, same as above:

    Please Login or Register  to view this content.
    copied across.

    Note: the second option is more efficient, especially if your lists are long....
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  5. #5
    Registered User
    Join Date
    08-13-2012
    Location
    South Africa
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: Avoid nested IF statement and bring columns together

    taps: The nested IFs worked, just very inefficiently.

    NBVC: Thank you for those 2 solutions. I'm just having some problems with them. The formula works for the first selection in the drop down box (John) but then brings in zeroes for other selections.
    Last edited by deanstein; 08-23-2012 at 02:08 AM.

  6. #6
    Registered User
    Join Date
    08-13-2012
    Location
    South Africa
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: Avoid nested IF statement and bring columns together

    NBVC: It just needed a small tweak. The last MATCH of both formulas should have C13 not C16. This is now solved! Thank you.

+ 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