+ Reply to Thread
Results 1 to 12 of 12

Assign the value in a Cell when two other cells in two columns contain the same text

  1. #1
    Registered User
    Join Date
    11-09-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2003
    Posts
    19

    Assign the value in a Cell when two other cells in two columns contain the same text

    Hello Everyone,

    the title is probably a bit confusing, but I will make it clear what I am struggling with. I have three very long columns, two are about names and the third about location as below:

    Column1....Column blank..Clumn2...Column3
    Karen...............................Karen......London
    Karen...............................Jack.........Bath
    Jack..................................Amy.........New York
    Jack
    Karen
    Karen
    Amy
    Amy
    Amy
    Amy

    I am looking for a formula I can drop down and that basic allow me to assign the text in Column 3 into the Column Blank according to Column 1. The result should be like:

    Column1...Column blank...Column2....Column3
    Karen........London...........Karen.........London
    Karen........London...........Jack............Bath
    Jack...........Bath...............Amy............New York
    Jack...........Bath
    Karen........London
    Karen........London
    Amy...........New York
    Amy...........New York
    Amy...........New York
    Amy...........New York

    Hope it makes sense, and thanks in advance

    Carmine
    Last edited by Carmine; 04-23-2014 at 09:13 AM.

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Assign the value in a Cell when two other cells in two columns contain the same text

    It's not cloear from your example but try:

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    11-09-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2003
    Posts
    19

    Re: Assign the value in a Cell when two other cells in two columns contain the same text

    Hi Zbor, I edited the post as it automatically crashed the blank space, so I made the dots. Could please have it a look again.

    Thank you

    Carmine

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Assign the value in a Cell when two other cells in two columns contain the same text

    It's always best to upload example workbook

  5. #5
    Valued Forum Contributor
    Join Date
    05-13-2010
    Location
    Belo Horizonte, Brazil
    MS-Off Ver
    Excel 2003; 2007
    Posts
    441

    Re: Assign the value in a Cell when two other cells in two columns contain the same text

    Carmine, Good morning.

    The ZBOR formula works perfectly.

    Just put it at B1 and copy down.

    Take a look at an example I did for you using a ZBOR formula.
    Is it what you want?
    Last edited by Mazzaropi; 04-23-2014 at 09:27 AM. Reason: attach an example
    ...If my answer helped you, Please, click on. * Add Reputation (at left)

    Best regards.
    Marc?lio Lob?o

  6. #6
    Registered User
    Join Date
    11-09-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2003
    Posts
    19

    Re: Assign the value in a Cell when two other cells in two columns contain the same text

    Here the work book. In column B I would like to write a formula that when A corresponds to C, it gives back the relevant location in C. Please let me know if it is still unclear

    Carmine
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    11-09-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2003
    Posts
    19

    Re: Assign the value in a Cell when two other cells in two columns contain the same text

    Hi,

    it works but not in my case. In the original document I have some spaces between C and D. And it does give me as result what in between. As I have to manage this, can you help you understand how can control for this?

    Thanks a lot

    Carmine

  8. #8
    Valued Forum Contributor
    Join Date
    05-13-2010
    Location
    Belo Horizonte, Brazil
    MS-Off Ver
    Excel 2003; 2007
    Posts
    441

    Re: Assign the value in a Cell when two other cells in two columns contain the same text

    Use it at B2
    =IFERROR(VLOOKUP(A2,$C$2:$D$20,2,FALSE),"")

    Tell us if it worked for you.

  9. #9
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Assign the value in a Cell when two other cells in two columns contain the same text

    Carmine can not use IFERROR formula with XL version 2003.

    Use this:

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  10. #10
    Valued Forum Contributor
    Join Date
    05-13-2010
    Location
    Belo Horizonte, Brazil
    MS-Off Ver
    Excel 2003; 2007
    Posts
    441

    Re: Assign the value in a Cell when two other cells in two columns contain the same text

    Carmine,

    The formula was indicated for you by ZBOR, based on your information, and now you gave us a model where a formula works prfectly.

    When you say:"...In the original document I have some spaces between C and D..."

    What it means exactly?

    Is you range from C to D or from C to other column, example, H ?

    What´s your real range?
    What´s a column with your desired information?

  11. #11
    Registered User
    Join Date
    11-09-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2003
    Posts
    19

    Re: Assign the value in a Cell when two other cells in two columns contain the same text

    Hi,

    it worked! I had just to specify instead of 2, the number of the column I was referring (4).

    Thank you very much. The VlOOKUP suggested by Zbor and exemplified by you was perfect

    Cheers

    Carmine

  12. #12
    Valued Forum Contributor
    Join Date
    05-13-2010
    Location
    Belo Horizonte, Brazil
    MS-Off Ver
    Excel 2003; 2007
    Posts
    441

    Re: Assign the value in a Cell when two other cells in two columns contain the same text

    Carmine,

    ...............thanks for the feedback.

    You're always welcome!

+ 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. [SOLVED] How to take cell with custom format and assign to variable as text (as appears in cell)
    By tv69 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-07-2014, 02:44 PM
  2. Replies: 5
    Last Post: 04-16-2012, 06:21 AM
  3. Assign text to cells
    By Squig in forum Excel General
    Replies: 6
    Last Post: 12-13-2011, 06:52 AM
  4. Replies: 5
    Last Post: 02-09-2006, 10:10 PM
  5. Assign a Colour to part of a Cells Text?
    By HotRod in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-06-2006, 03:15 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