Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 121
Default Target Macro

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?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Target Macro

Hi,

I don't really understand the question but this looks at every cell in the
used range of column F for the text 'Something" and if it finds it put Target
in column G

Sub sonic()
Dim LastRow As Long
Dim MyRange As Range
LastRow = Cells(Rows.Count, "F").End(xlUp).Row
Set MyRange = Range("F1:F" & LastRow)
For Each c In MyRange
If c.Value = "something" Then
c.Offset(, 1).Value = "Target"
End If
Next
End Sub

Mike

"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?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 121
Default Target Macro

This is very good. Thank you for you're help!

"Mike H" wrote:

Hi,

I don't really understand the question but this looks at every cell in the
used range of column F for the text 'Something" and if it finds it put Target
in column G

Sub sonic()
Dim LastRow As Long
Dim MyRange As Range
LastRow = Cells(Rows.Count, "F").End(xlUp).Row
Set MyRange = Range("F1:F" & LastRow)
For Each c In MyRange
If c.Value = "something" Then
c.Offset(, 1).Value = "Target"
End If
Next
End Sub

Mike

"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?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Target Macro MCheru Excel Programming 1 April 2nd 09 04:36 PM
Target cell reference moves when target is cut and pasted Illya Teideman Excel Discussion (Misc queries) 5 May 31st 07 11:34 AM
Macro target to MsWord Param Excel Worksheet Functions 1 March 20th 06 03:16 PM
Ranges:Target in Worksheet_SelectionChange(ByVal Target As Range) Kevin McCartney Excel Programming 3 April 15th 05 01:51 PM
How find if target is object in Worksheet_Change (ByVal Target As.. ?) Gunnar Johansson Excel Programming 3 July 1st 04 09:25 PM


All times are GMT +1. The time now is 01:49 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"