copy cell if containing the value to the previous column but the same row

  • Hi Helpers


    I am new to vba but I know that it is very helpful to do heavy data in excel. My question is that I want to find value contains in column B and if found I would copy them to column A in the same row. For example if the value in B4 contains my search value i.e "*CASH*" then copy that to A4 and the same goes to the rest. I have a macro given in the attached .xls but if I run this in sheet1 the result will be like as given in "macro test result" sheet without giving the one required like as shown in "result needed" sheet. can anyone help on this code?? your answer is very much appreciated.


    Thanks in advance

  • Re: copy cell if containing the value to the previous column but the same row


    Hello,


    Congratulations on your first macro ...!!! :wink:


    In fact, you do not need the variable x ...



    Hope this will help

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Thumbs Up" icon, below, in the bottom right corner:)

  • Re: copy cell if containing the value to the previous column but the same row


    Glad you could fix your problem ...:wink:


    Thanks ... for your thanks ..:smile:

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Thumbs Up" icon, below, in the bottom right corner:)

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!