Excel spaces between rows


  1. Posts : 174
    microsoft windows 10
       #1

    Excel spaces between rows


    Hi,, I have a col that is the result of an if function.
    =IF(H105="a",B105,"")
    Which results in a col of names in col O if there is an "a" in col H.
    But if it is not an "a" it is a space, how can I do it so that all the spaces are removed
    and I end up with a col of names with no spaces please.
    Len
      My Computer


  2. Posts : 2,450
    Windows 10 Pro x64
       #2

    donnylad said:
    Hi,, I have a col that is the result of an if function.
    =IF(H105="a",B105,"")
    Which results in a col of names in col O if there is an "a" in col H.
    But if it is not an "a" it is a space, how can I do it so that all the spaces are removed
    and I end up with a col of names with no spaces please.
    Len
    Hi Len,

    The problem is that Excel does not provide the ability to enter a “Null” character as result of a formula. The “” you have in your formula is not actually a space but a special Excel “blank”, which screws up every calculation involving it!

    So to overcome that you can use this formula:
    =IF(H105="a",B105, NA())

    This will create a #N/A, instead of the special Excel “blank”, in all cells that do not meet the if criteria.

    Then go to “Find & Select” > “Go To Special” and click on “Formulas”. Deselect everything but “Errors”. Once all #N/A (i.e. Errors) are selected you can press delete to delete them and be left with empty cells.
      My Computer


  3. Posts : 174
    microsoft windows 10
    Thread Starter
       #3

    I am very sorry if I did not make it clear but my formula is ok but I am ending up with a column of name with spaces and I want to know how to collapse them with a column that has no spaces, EG.
    Fred
    Charlie

    Harry

    Tom

    Alan


    To
    Fred
    Charlie
    Harry
    Tom
    Alan
    Hope that explains it better
    Len
      My Computer


  4. Posts : 2,450
    Windows 10 Pro x64
       #4

    The only way I can think of, is to use filtering on your columns and filter out the blank cells.
      My Computer


  5. Posts : 174
    microsoft windows 10
    Thread Starter
       #5

    Thankyou Dimitri,,I can do it that way .
    Happy now
    Len
      My Computer


  6. Posts : 2,450
    Windows 10 Pro x64
       #6

    You're welcome Len.
    Glad that this works for you.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 01:23.
Find Us




Windows 10 Forums