+ Reply to Thread
Results 1 to 15 of 15

cell contents, is also found in a range of cells, then is text in adjacent columns equal

  1. #1
    Registered User
    Join Date
    07-30-2014
    Location
    London, England
    MS-Off Ver
    Office for MAC
    Posts
    25

    cell contents, is also found in a range of cells, then is text in adjacent columns equal

    I think that I need an if statement comparing results in one cell with content matched in a vlookup. Let me explain

    I have text data in a cell (actually in a long list of cells) which I need to find in a similar column from a report a week earlier... If the data matches, I want to compare the information in the corresponding columns three columns to the left of the selected column and see if they changed. Saying it another way, if the result from a vlookup shows a match, I want to match other information in nearby columns..

    I have attached a brief example. The information in the second worksheet would be the same but from a different date.

    Thanks in advance
    Attached Files Attached Files
    Last edited by sgetraer; 08-04-2021 at 05:43 PM. Reason: changed attachment

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,397

    Re: cell contents, is also found in a range of cells, then is text in adjacent columns equ

    There are instructions at the top of the page explaining how to attach your sample workbook.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,533

    Re: cell contents, is also found in a range of cells, then is text in adjacent columns equ

    The attachment was not included.

    You cannot use VLOOKUP if the data is to the LEFT of the matched entry. You would need to use INDEX/MATCH or possibly XLOOKUP if your version of Excel includes that function.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Registered User
    Join Date
    07-30-2014
    Location
    London, England
    MS-Off Ver
    Office for MAC
    Posts
    25

    Re: cell contents, is also found in a range of cells, then is text in adjacent columns equ

    thx, thought I attached the example... I now have (hopefully)

  5. #5
    Registered User
    Join Date
    07-30-2014
    Location
    London, England
    MS-Off Ver
    Office for MAC
    Posts
    25

    Re: cell contents, is also found in a range of cells, then is text in adjacent columns equ

    I thought I attached the example.. I now have... thx

  6. #6
    Valued Forum Contributor
    Join Date
    06-23-2021
    Location
    Romania
    MS-Off Ver
    2021, 365 v 2208
    Posts
    722

    Re: cell contents, is also found in a range of cells, then is text in adjacent columns equ

    I really don't understand which columns to compare.
    What text do you mean? Please explain what you have and what you want to achieve, without suggesting any function
    Diana Tanase


    If the solutions offered helped you to solve your problem, then mark the thread as SOLVED (thread tools in the top menu) and you can click on * to add reputation to those who helped you, as a way to say thank you !

  7. #7
    Registered User
    Join Date
    07-30-2014
    Location
    London, England
    MS-Off Ver
    Office for MAC
    Posts
    25

    Re: cell contents, is also found in a range of cells, then is text in adjacent columns equ

    Thanks for looking.. I am trying to match the text in a cell in column E (definition) in one worksheet with the same information in another worksheet ( in a range of about 4000 rows) from a prior time period. If the cells match, then I want to see if the information in column B (status) is the same or different.

  8. #8
    Valued Forum Contributor
    Join Date
    06-23-2021
    Location
    Romania
    MS-Off Ver
    2021, 365 v 2208
    Posts
    722

    Re: cell contents, is also found in a range of cells, then is text in adjacent columns equ

    Can you please attach a 2-sheets workbook according to the problem you presented? It would be much easier for me to work if you did this

  9. #9
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,533

    Re: cell contents, is also found in a range of cells, then is text in adjacent columns equ

    No idea what you are trying to do with that. Which cell/s has/have the data to match, and which cells have the data you need to match against. And, if you get a match, which cells are you comparing? What happens if you don't get a match?

  10. #10
    Registered User
    Join Date
    07-30-2014
    Location
    London, England
    MS-Off Ver
    Office for MAC
    Posts
    25

    Re: cell contents, is also found in a range of cells, then is text in adjacent columns equ

    Sorry I am not being clear. I have modified the example and hopefully that will help.
    As an example, I want to find if the information in sheet2 cell E2 can be found in sheet1 columnE (any row).
    If there is a match, I want to know if the corresponding information in sheet2 cell B2 is the same as the information in the corresponding cell in sheet1.
    The sheets will be about 4000 rows and I want to see how many changes there are in the column B information.. I will use the information on changed conditions to update Sheet2 (which I can do by filtering for the changes and then updating).

    I appreciate the help and sorry if I didn't explain it well before.

  11. #11
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,533

    Re: cell contents, is also found in a range of cells, then is text in adjacent columns equ

    The original sample workbook is gone, fair enough, but there is no updated workbook.

  12. #12
    Registered User
    Join Date
    07-30-2014
    Location
    London, England
    MS-Off Ver
    Office for MAC
    Posts
    25

    Re: cell contents, is also found in a range of cells, then is text in adjacent columns equ

    I am beginning to think I am an idiot (probably just confirming), or maybe it's just late...

    I think the new one is there now...

  13. #13
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,533

    Re: cell contents, is also found in a range of cells, then is text in adjacent columns equ

    Put this in column F2 on Sheet 2 and drag across 3 columns, F to H:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Or, you could use: =IFERROR(INDEX(Sheet1!$A:$C,MATCH($E2,Sheet1!$E:$E,0),MATCH(A$1,Sheet1!$A$1:$E$1,0)),"")

    Then, in I2, to compare the cells:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Drag all the formulae down to the end of the data.

    Some problems though. The dates in column A on Sheet 1 are NOT dates. The data in the status columns is not consistent. Bucket Name is OK.

    On this basis, it's probably not a good idea to do a combined comparison as it will not highlight any specific anomalies.

    So, maybe just
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    dragged across and down.

  14. #14
    Registered User
    Join Date
    07-30-2014
    Location
    London, England
    MS-Off Ver
    Office for MAC
    Posts
    25

    Re: cell contents, is also found in a range of cells, then is text in adjacent columns equ

    I really appreciate your help... I tried your solution on the 'real file' and it seemed to give me incomplete results (worked on certain rows, not on others). I have recreated my actual file with no data (except in the columns that I am trying to verify the differences) and only column headings. If it isn't too much to ask, can you give me the formulas that I could use with this worksheet. I think I may have erred in trying to transition your formulas from the simplified example I attached yesterday... The new file is called Book7..
    Last edited by sgetraer; 08-05-2021 at 05:07 AM.

  15. #15
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,533

    Re: cell contents, is also found in a range of cells, then is text in adjacent columns equ

    Always best to provide a sample workbook that replicates the structure and layout of the original.


    Sheet 1, cell AC2:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Sheet 'USA and CAN 210719' cell AC2:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Copied back, across, and down as required.

+ 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: 07-17-2020, 01:15 PM
  2. Sum if text string is found in within either of 2 non-adjacent columns
    By Lylester in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-22-2019, 10:43 AM
  3. Formula to identify part of a text in cell from range of cells & insert adjacent cell text
    By Novicebutnotforlong in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 11-19-2013, 02:11 AM
  4. [SOLVED] vba overwrite text in string if found in a range using adjacent values ( inside same cell)
    By vlady in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-09-2013, 11:32 PM
  5. [SOLVED] IF range of cells contains string of text, return contents of cell where string is found
    By nobodyukno in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 07-03-2013, 09:56 AM
  6. [SOLVED] VBA Code - Compare Adjacent Cells In two columns and clear contents when a match is found
    By Langer101 in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 01-03-2013, 06:22 AM
  7. Counting adjacent cells(text) to equal one value
    By Calithea in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-29-2012, 04:08 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