Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 11-14-2015, 04:50 PM
Snaybot Snaybot is offline If column B cell is a certain value then copy and paste the value to column A Windows 7 64bit If column B cell is a certain value then copy and paste the value to column A Office 2013
Novice
If column B cell is a certain value then copy and paste the value to column A
 
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
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy column 1 data into Column 3 ShailShin Word VBA 1 06-18-2015 10:49 AM
Excel copy two numbers between specific column and paste in next sheet visha_1984 Excel 1 12-26-2014 07:59 PM
how can i split a column of rows in half without copy and paste.. Lindseyfparker Excel 2 04-25-2014 12:52 AM
If column B cell is a certain value then copy and paste the value to column A keep each item/cell in column A associated with a group in column C ht889 Excel 1 02-25-2014 12:36 PM
How can I delete the content of a cell in column if the cell value is more than 1000? Learner7 Excel 2 06-27-2011 05:44 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:30 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft