• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Subtract Entire String In A1 From B1?

If B1 contains text Then

Subtract B1's entire contents from A1 (while leaving whatever remains in A1)?


My goal is to just minus the string portion out of A1 with whatever was in B1 (If B1 contains text)


A2 minus B2, A3 minus B3 etc..


I will need the cell referece as (0,1) - (0,2) though.
 
Sub h()


Worksheets("sheet1").Select

For Each c In Range(Cells(2, 1), Cells(2, 1).End(xlDown))

Row = c.Row

Cells(Row, 1).Value = Application.WorksheetFunction.Substitute(Cells(Row, 1).Value, Cells(Row, 2).Value, "")


Next


End Sub
 
Back
Top