none
How to check if a specific text is there in the cell RRS feed

  • Question

  • My table has a column with few semicolons separated values like 

    " P800 PU; P900PU; P950PU; P12 "

    now I have to select the P950PU if it is present in that not if it is not there then P900PU. There is a priority order for selection which is fixed but the sequence of value in the cell can be anything like  

    " P800 PU; P950PU "
    " P800 PU; P12; P900PU; P950PU; "

    " P950PU; P900PU; P800 PU "

    How can it be done? Please Help.

    Wednesday, June 6, 2018 7:36 AM

All replies

  • Firstly, is a VBA solution acceptable or do you want it as formulas on the worksheet?

    I see a few problems with the data. Some of the data has a space separating the numeric and PU and other data does not have the space. Will the actual data have the spaces with some and not others and if so, will the fixed list with the sequence also have matching spaces?

    When matches are found, do you want the match in a cell adjacent to the source data?

    If you upload an example workbook to OneDrive with some sample source data and include an example of how you want the output displayed then it will be very helpful.

    Guidelines to upload a workbook on OneDrive. (If you already use OneDrive and your process for saving to it is different then you can probably start at step 8 to get the link but please zip the file before uploading.)

    1. Zip your workbooks. Do not just save an unzipped workbook to OneDrive because the workbooks open with On-Line Excel and the limited functionality with the On-Line version causes problems.
    2. To Zip a file: In Windows Explorer Right click on the selected file and select Send to -> Compressed (zipped) folder). By holding the Ctrl key and left click once on each file, you can select multiple workbooks before right clicking over one of the selections to send to a compressed file and they will all be included into the one Zip file.
    3. Do not use 3rd party compression applications because I cannot unzip them. I do not clog up my computer with 3rd party apps when there are perfectly good apps supplied with windows.
    4. Go to this link.  https://onedrive.live.com
    5. Use the same login Id and Password that you use for this forum.
    6. Select Upload in the blue bar across the top and browse to the zipped folder to be uploaded.
    7. Select Open (or just double click). (Be patient and give it time to display the file after initially seeing the popup indicating it is done.)
    8. Right click the file on OneDrive and select Share.
    9. Select "Get a Link" from the popup menu.
    10. Click in the field displaying the link and it should highlight and then Copy and Paste the link into your reply on this forum. (I suggest that you avoid the "Copy" button on the "Get a link" screen because it introduces additional steps that are not required.)

    Regards, OssieMac

    Friday, June 8, 2018 4:02 AM