![]() |
Target
Is there a macro that will scan every even cell in column F for contents and
when it finds contents it will do this (ActiveCell.FormulaR1C1 = "Target") in the even cell next to it in Column G? |
Target
See answer in your FIRST post
-- Don Guillett Microsoft MVP Excel SalesAid Software "Workbook" wrote in message ... Is there a macro that will scan every even cell in column F for contents and when it finds contents it will do this (ActiveCell.FormulaR1C1 = "Target") in the even cell next to it in Column G? |
Target
Try this. Be aware that it will do this on the "ActiveSheet".
Sub Test() Dim aWS As Excel.Worksheet Dim i As Long Dim lRow As Long Dim myCell As Excel.Range Set aWS = ActiveSheet lRow = aWS.Cells(aWS.Rows.Count, "F").End(xlUp).Row For i = 2 To lRow Step 2 Set myCell = aWS.Cells(i, "F") If Not IsEmpty(myCell) Then myCell.Offset(0, 1).Value = "Target" End If Next i End Sub "Workbook" wrote: Is there a macro that will scan every even cell in column F for contents and when it finds contents it will do this (ActiveCell.FormulaR1C1 = "Target") in the even cell next to it in Column G? |
Target
I see you've asked this once before. Please only ask the question once.
Otherwise, people waste their time answering a question that's already been answered. "Workbook" wrote: Is there a macro that will scan every even cell in column F for contents and when it finds contents it will do this (ActiveCell.FormulaR1C1 = "Target") in the even cell next to it in Column G? |
Target
Yes, I am sorry about that, it was not something that I did intentionally. I
was having problems with my connection. Whenever I posted the question I got an error message that said it had not posted. My apologies. Thank you for you're help. The code works. "Barb Reinhardt" wrote: I see you've asked this once before. Please only ask the question once. Otherwise, people waste their time answering a question that's already been answered. "Workbook" wrote: Is there a macro that will scan every even cell in column F for contents and when it finds contents it will do this (ActiveCell.FormulaR1C1 = "Target") in the even cell next to it in Column G? |
Target
My apologies. I was having trouble with my connection. Whenever I posted
the message I got an error message that said it had not posted. I am sorry. I appreciate your help. "Don Guillett" wrote: See answer in your FIRST post -- Don Guillett Microsoft MVP Excel SalesAid Software "Workbook" wrote in message ... Is there a macro that will scan every even cell in column F for contents and when it finds contents it will do this (ActiveCell.FormulaR1C1 = "Target") in the even cell next to it in Column G? |
All times are GMT +1. The time now is 10:14 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com