+ Reply to Thread
Results 1 to 9 of 9

Remove spaces

  1. #1
    Registered User
    Join Date
    10-11-2014
    Location
    Noitacol, Acirema
    MS-Off Ver
    Office 365 2019
    Posts
    53

    Remove spaces

    SO I have an excel sheet to track receipts pulled from a website, I figured out how to pull the raw DATA to get only what, problem is I have a bunch of "spaces" that aren't really spaces cause there's formulas in them, how do I get only the DATA without the spaces so I could copy/paste them all at once into another sheet? Please see attached XLSX sheet
    Attached Files Attached Files

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,825

    Re: Remove spaces

    If by "spaces" you mean blank rows, then you can put this formula in, say, D2:

    =IFERROR(INDEX(B:B,(ROWS($1:1)-1)*4 +2)&"","")

    then copy down until your start to get blanks returned.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    10-11-2014
    Location
    Noitacol, Acirema
    MS-Off Ver
    Office 365 2019
    Posts
    53

    Re: Remove spaces

    AWESOME, not sure how that formula works but it did, THANK YOU!

  4. #4
    Registered User
    Join Date
    10-11-2014
    Location
    Noitacol, Acirema
    MS-Off Ver
    Office 365 2019
    Posts
    53

    Re: Remove spaces

    OK this is extremely frustrating, this work perfectly the first time I did it, then I tried it again after pasting in new info on the other sheet and all of a sudden it no longer worked???
    Last edited by jeffreybrown; 03-02-2017 at 11:12 PM. Reason: Removed full quote

  5. #5
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,825

    Re: Remove spaces

    What do you mean by "it no longer worked"? Are you getting error messages, or just blanks? Does your first row of data appear on row 2, as it did in the sample file?

    Pete

  6. #6
    Registered User
    Join Date
    10-11-2014
    Location
    Noitacol, Acirema
    MS-Off Ver
    Office 365 2019
    Posts
    53

    Re: Remove spaces

    OK so This is the original sheet, the formula =IFERROR(INDEX(B:B,(ROWS($1:1)-1)*4 +2)&"","") worked perfect, until I pasted new DATA in the RAW tab, for some reason all of a sudden when I try this formula in the RAW tab or the other tab it doesn't seem to want to work, not sure what could possibly be the problem!
    Attached Files Attached Files

  7. #7
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,825

    Re: Remove spaces

    In the original file that you attached the data was separated by the same number of blank rows each time, i.e. there were 3 blank rows between the data so the data appeared on every 4th row starting on row 2 - those are the numbers used in the formula that I gave you. However, in this latest file the separation between the data rows is variable. There are 8 rows between the 1st and 2nd and between the 2nd and 3rd record, but then it changes to 9 rows, then back to 8, and then every 4th row until it changes back to 8 rows at the end of your data. Consequently, you will need a different approach.

    In cell D2 of the RAW sheet you can use this formula:

    =IF(B2="","",MAX(D$1:D1)+1)

    Then you can use this formula in E2:

    =IFERROR(INDEX(A:A,MATCH(ROWS($1:1),$D:$D,0)),"")

    and copy this into F2. All the formulae should automatically copy down to the bottom of your table. You can use the same formulae in the same cells in Sheet2 (though you will need to copy these down manually, as they are not part of the table).

    Hope this helps.

    Pete

  8. #8
    Registered User
    Join Date
    10-11-2014
    Location
    Noitacol, Acirema
    MS-Off Ver
    Office 365 2019
    Posts
    53

    Re: Remove spaces

    Man you're good, thanks again! lol
    Last edited by jeffreybrown; 03-02-2017 at 11:11 PM. Reason: Removed full quote

  9. #9
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,825

    Re: Remove spaces

    Glad to help - you might like to re-mark this thread as SOLVED, if you think it has been now.

    You might also like to know that you can directly thank those who have helped you by clicking on the small "star" icon located in the lower left corner of a post that you have found to be helpful (not just in this thread - for any post that has helped you). This also adds to the reputation of the poster (the small green bars in the poster's profile).

    Pete

+ 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. Remove spaces
    By AlexanderCH in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-24-2016, 10:30 AM
  2. Excel 2007 : Remove spaces
    By sushil10s in forum Excel General
    Replies: 2
    Last Post: 11-21-2011, 08:21 AM
  3. Remove Spaces / Add ,
    By Bluseals in forum Excel General
    Replies: 1
    Last Post: 07-27-2010, 03:37 PM
  4. Remove spaces
    By neilpateluk in forum Excel General
    Replies: 8
    Last Post: 12-03-2008, 09:49 AM
  5. Best way to remove spaces?
    By gzski23 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-30-2008, 04:26 PM
  6. [SOLVED] How do I remove spaces
    By lovebaby in forum Excel General
    Replies: 5
    Last Post: 10-29-2005, 12:05 PM
  7. Remove Spaces
    By Ronbo in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-08-2005, 11:06 PM

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