+ Reply to Thread
Results 1 to 6 of 6

Excel 2007 : Is it possible to reverse data in a cell

  1. #1
    Registered User
    Join Date
    06-23-2011
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2007
    Posts
    2

    Is it possible to reverse data in a cell

    Hello All,

    I'm working on a huge spreadsheet that contains a lot of data and a couple worksheets. There is one section of a worksheet that has multiple cells with people’s names in them. The cells are formatted as 'last name, first name'. On the next work sheet there are all the same entries for names. However on this sheet the cells with names are formatted as ‘First name, Last name’, which is a reverse order from the previous work sheet. I want to do a Vertical Look up to pull data in from one work sheet to the next. The common denominator or 'lookup_value' would be the name. However the vertical look up doesn't work, because the names don't match, since they are formatted differently on each work sheet. So my question is, is there a formula or way to reverse the data in a cell. I would like to take the data that is formatted as First Name, Last Name and do a formula that would flip flop based on the 'comma', so that all these cells would now be Last Name, First name. Any help anyone can provide would be greatly appreciated.

    Thanks in advance.

    PS. This was my first post, but I anticipate posting more, as this is a very useful site. So if anything was wrong w/ my post, please let me know as I'd like to fully adhere to the rules and regulations of the board.

    Thanks again all!
    Last edited by jjjason10; 06-23-2011 at 12:47 PM.

  2. #2
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Is it possible to reverse data in a cell

    Hi,

    Try this: =TRIM(RIGHT(A1,LEN(A1)-FIND(",",A1))&", "&LEFT(A1,FIND(",",A1)-1))

    Dom
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

  3. #3
    Registered User
    Join Date
    06-23-2011
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Is it possible to reverse data in a cell

    Holy Schnikes, thats awesome. Totally worked. Thanks so much for the help Domski

  4. #4
    Registered User
    Join Date
    05-21-2014
    Location
    Nova Scotia, Canada
    MS-Off Ver
    2013
    Posts
    9

    Re: Is it possible to reverse data in a cell

    I am trying to do the exact same thing (although first and last names are separated with a space); how do I apply the formula to the column with names?

    EDIT: I should clarify my question - is there a way to reverse the list of names in the existing cells, instead of creating a second list that uses the first as a reference?

    Thanks!
    Last edited by AccountsHIS; 09-08-2015 at 02:57 PM. Reason: clarification

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: Excel 2007 : Is it possible to reverse data in a cell

    Accountant, welcome to the forum

    1st, apart from manual or VBA, there is no way to have contents of a cell adjusted.

    2nd Unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  6. #6
    Registered User
    Join Date
    05-21-2014
    Location
    Nova Scotia, Canada
    MS-Off Ver
    2013
    Posts
    9

    Re: Excel 2007 : Is it possible to reverse data in a cell

    Hi Ford -
    Thank you for both the answer and the reminder of forum decorum - I'll be sure to start a new thread next time

+ 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