Search Column L for Arrays and Replace Values in Col O

  • Hello All,

    Please find the attached sample where I would like VBA to search for an Array of Text in Col L from L3 till down.

    Note that there may be blanks in Col L.

    eg Type1, Type2, Type3, Type5, Type6, Type7 and fill up "PC" on the same Row under Col O where one of the Types are found.

    Note that there may already values under Col O or blanks.

    Col O should replace the old values or blank Ozgrid Help.xlsxOzgrid Help.xlsxwith "PC"

    Thanks in advance

  • Possibly...??

    If I've been helpful, let me know. If I haven't, let me know that too.

  • Hi Dangelor,

    Thanks for your code.

    The sample I submitted was to indicate different types of Texts. It can be eg Paper, Eraser, Board. etc etc.

    So I need the code to look for Arrays of Values and do the replacement.

    Secondly the code should run on ActiveSheet and not on Sheet 1

    Could you please amend it accordingly.

    Hope it is clear now.

    Thanks for your time and help.

  • Hi PR,

    I think I can safely say that your requirement is not clear. I cannot workout whether you intend to have an array in the cell (eg separated by a comma or other) or you mean you want to compare the value in column L against an array and if it matches then put PC in column O.

    The first objective could be achieved using a simple vlookup formula against a table of values.

    You should make your sheet representative of what you are working with, and include a before and after example.



  • If I've been helpful, let me know. If I haven't, let me know that too.