View Single Post
 
Old 11-14-2015, 04:50 PM
Snaybot Snaybot is offline Windows 7 64bit Office 2013
Novice
 
Join Date: Sep 2015
Posts: 22
Snaybot is on a distinguished road
Default If column B cell is a certain value then copy and paste the value to column A

So Far I have this its not working too well haha

Code:
Sub MI_TEST_1()
' MI_TEST_1 Macro
Dim nxtRow As Integer
Dim i As Integer
For i = 1 To Cells(Rows.Count, 2).End(xlUp).Row
    'If Left(Cells(i, 2), 1) = "T" Then
'Determine if change was to Column F (6)
 If Target.Column = 2 Then
'If Yes, Determine if cell = B
  If Target.Value = Left(Cells(i, 2), 1) = "T" Then
   nxtRow = Sheets(2).Range("B" & Rows.Count).End(xlUp).Row + 1
    Target.EntireRow.Copy _
     Destination:=Sheets(2).Range("A" & nxtRow)
  End If
 End If
End Sub
If the first letter of column B is a "T" then paste the value into the adjacent cell into column A

For Example:

IF cell B10 is "T1" then paste a "T" in to cell A10 if A10 is empty

Cross post:
http://www.mrexcel.com/forum/excel-q...ml#post4342659
http://www.excelforum.com/excel-prog...ml#post4241066
Reply With Quote