+ Reply to Thread
Results 1 to 8 of 8

Shifting up cells to a certain character

  1. #1
    Registered User
    Join Date
    02-23-2020
    Location
    Milton Keynes, England
    MS-Off Ver
    365 ProPlus
    Posts
    5

    Shifting up cells to a certain character

    Hi there,

    I have a spreadsheet containing several thousand names (pupils) with details such as email, grade, telephone, distance and first part of postcode. All data is fictional for this question!

    At the moment each field type is in a seperate column, on different rows. I would like them to all be on 1 row, so I can format them and put them into a database.

    The issue is the data is not uniform. For e.g. with some pupils we have the email, but not a phone number, but the phone number cell doesn't have any data in - it's just blank. Also the number of rows between each name is not the same... for some it's 5, some 6, some 4, some 3 so that doesn't help.

    Is there a way to shift up all data to the point it hits the line with dollar signs in it? Or a better way of doing it entirely?

    This is what I have:
    Before.PNG

    This is the desired:
    After.PNG

    I'm normally not bad at organising data and sure there is a simple solution... but this has me stumped!
    Thanks in advance!!

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Shifting up cells to a certain character

    Welcome to the forum

    Please attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Registered User
    Join Date
    02-23-2020
    Location
    Milton Keynes, England
    MS-Off Ver
    365 ProPlus
    Posts
    5

    Re: Shifting up cells to a certain character

    Thank you for the welcome and reply! Hopefully the example file will be attached now...
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    02-23-2020
    Location
    Milton Keynes, England
    MS-Off Ver
    365 ProPlus
    Posts
    5

    Re: Shifting up cells to a certain character

    ... am I just going to have to move each manually, or insert lines manually to make them all uniform? :'(

  5. #5
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    2,831

    Re: Shifting up cells to a certain character

    Well, here's one option:
    Since you have O365, I think you should have access to the new formulas, specifically the FILTER formula. Here are the steps I went through.
    1. Select the range of data - B1:J38 and press < ctrl >+H (to bring up the find and replace dialog box). in the "Find What" field, enter $ and don't type anything the "Replace with" field so all $ are removed.
    2. In your example, in cell K2 I entered:
    =IF(B2="","",B2)
    3. In cell L2 I entered:
    =IFS(C2 <> "",C2,COUNTBLANK($B$2:$B3) < COUNTBLANK(L$1:L1),"None",C2="","")

    I copied this formula across to cell R2 so it has the same amount of fields as your original data. I then copied these formulas down to the bottom of your list (row 38).
    Then on Sheet 2 I entered:
    =FILTER(Current!K2:K38,Current!K2:K38 <> "")
    This will "Spill" down the column. I then just copied that formula over as far as I needed to.

    Attached shows the result.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    02-23-2020
    Location
    Milton Keynes, England
    MS-Off Ver
    365 ProPlus
    Posts
    5

    Re: Shifting up cells to a certain character

    Thank you so so much, no only for taking the time to reply but for such a great answer when no-one else could. You've saved me 10+ hours of work!!

    One last thing - is it possible to paste special values with the =filter list?

    Thank you again sincerely for your reply

  7. #7
    Registered User
    Join Date
    02-23-2020
    Location
    Milton Keynes, England
    MS-Off Ver
    365 ProPlus
    Posts
    5

    Re: Shifting up cells to a certain character

    Figured it. Did = for the range then did paste special values. Sorted. Thank you so much agian!

  8. #8
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    2,831

    Re: Shifting up cells to a certain character

    You're welcome - glad I could help.

+ 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. Replies: 3
    Last Post: 09-21-2015, 08:43 AM
  2. Shifting Cells
    By KristenL in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-05-2014, 04:42 PM
  3. Replies: 4
    Last Post: 08-26-2014, 09:20 AM
  4. Shifting....cells
    By brjohnsmith in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-07-2014, 02:46 PM
  5. [SOLVED] Inserting a cell and shifting right if the first character is a letter
    By DannyJ in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-06-2013, 09:55 AM
  6. Shifting Cells to the Right
    By tomwest in forum Excel General
    Replies: 1
    Last Post: 04-09-2010, 06:48 AM
  7. shifting cells
    By ExcelNewby in forum Excel General
    Replies: 0
    Last Post: 01-22-2008, 09:52 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