Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Do Until VB Macro
Greetings:
I am not sure how to get excel to perform this function. I would like a macro to find the text value C in column C and autofill the letter C in column A until it comes to the text value D in column C and continue to autofill the letter D in column A. Any help would be greatly appreciated. Thank you in advance. Jerry |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Do Until VB Macro
Jerry,
You could do something like: Sub TryNow() Dim myCell As Range Dim FoundC As Boolean Dim FoundD As Boolean FoundC = False FoundD = False For Each myCell In Intersect(Range("C:C"), ActiveSheet.UsedRange) If FoundC Or myCell.Value = "C" Then FoundC = True Cells(myCell.Row, 1).Value = "C" End If If FoundD Or myCell.Value = "D" Then FoundC = False FoundD = True Cells(myCell.Row, 1).Value = "D" End If Next myCell End Sub HTH, Bernie MS Excel MVP "Jerry" wrote in message om... Greetings: I am not sure how to get excel to perform this function. I would like a macro to find the text value C in column C and autofill the letter C in column A until it comes to the text value D in column C and continue to autofill the letter D in column A. Any help would be greatly appreciated. Thank you in advance. Jerry |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro recorded... tabs & file names changed, macro hangs | Excel Worksheet Functions | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
Excel Macro Issue Trying to autorun Macro Upon Opening Worksheet | Excel Programming | |||
macro to delete entire rows when column A is blank ...a quick macro | Excel Programming | |||
Start Macro / Stop Macro / Restart Macro | Excel Programming |