Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Apply Macro to Specific Column
Hi
you may post your existing macro. But as an example try ... dim rng as range set rng = columns(3) 'or 'set rng = range("C:C") for each c in rng '.... -- Regards Frank Kabel Frankfurt, Germany WintonCW wrote: I have written a macro that highlights numbers in a given range (for each c in <range) However, I can't figure out how to set the range to only a specific column I have found the column number using a cells.find(), but how do I set the range? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Apply Macro to Specific Column (Answered my own question)
Thanks -- this is the code that works::
Dim myCol As Long Dim myCell As Range Set myCell = Cells.Find("Code") If Not myCell Is Nothing Then myCol = myCell.Column End If For Each c In Columns(myCol).Cells ..... Next c |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro from cell specific to whole column | Excel Discussion (Misc queries) | |||
modify a macro to apply to a specific range of cells | Excel Discussion (Misc queries) | |||
lookup specific text, then apply rules | Excel Worksheet Functions | |||
How do I record a macro to move down and over to specific column | Excel Discussion (Misc queries) | |||
Macro to search a column for a specific word and replace with | Excel Programming |