Wednesday, 15 February 2012

Excel copy values from column to column but remove specific text -


Hi, I am using this code to copy values ​​from sheet (1) column A to sheet (2) column B. It is working fine and whenever a value column is updated in column A, it is updated.

The problem, or the question I have, is that I want to include another column in sheet (1), column (B). Column B. contains only different names, and are not being copied

  Private sub worksheet tags (by-target in the form of range) if not known (target, range ("A1: A50" )) Then there is nothing range ("A1: A50"). Copy Sheets (2) .Renze ("B1") end if the end is sub  

But if the word "SUM" in column B is copied from column A to Sheet 2 in column B.

Use . To see that the 'SUM' sheet is in (2) .col (B)

  Dynamic RJD in the form of private sub-worksheet tags (range by target) If not (target, range "A1: A50")) nothing is set RNG = Sheets (2). Ranges ("B: B"). Find: = "SUM", LookIn: = xlFormulas, _ LookAt: = xlPart, MatchCase: = False Range ("A1: A50"), if RNG is nothing. Copy sheets (2) .Renz ("B1") end if set RNG = some end if the end sub  

No comments:

Post a Comment