LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 118
Default Loop Column letter A to Z ??

Sub testrow()
Dim c As Range, i As Integer 'I INTEGER???
Dim ReplaceFrom As String
Dim ReplaceTo As String

ReplaceFrom = InputBox("Letter to be replaced - Same case")
ReplaceTo = InputBox("Letter to be replaced to- Same case:")

For Each c In Selection.SpecialCells(xlCellTypeFormulas)
With c
For i = A To Z ????????
.Formula = Replace(.Formula, i & ReplaceFrom, i &
ReplaceTo)
Next i

.Formula = Replace(.Formula, ReplaceFrom & "$", ReplaceTo &
"$")
.Formula = Replace(.Formula, "(" & ReplaceFrom, "(" &
ReplaceTo)
End With
Next c
End Sub

CAN ANYBODY CORRECT THIS MACRO OR GIVE ME THE CODE WHICH WOULD LOOP
FROM A-Z (ReplaceFrom & ReplaceTo being row numbers)

Thxs

 
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
How do I turn excel columns from column number to column letter? column Setting up and Configuration of Excel 1 April 29th 08 10:15 AM
How to replace column letter in refferences with a function using the old column letter? Dmitry Kopnichev Links and Linking in Excel 6 October 13th 05 09:09 AM
How to replace column letter in refferences with a function using the old column letter? Dmitry Kopnichev Excel Worksheet Functions 6 October 13th 05 09:09 AM
Column letter Steve Excel Programming 2 August 17th 05 11:39 PM
column header changed from letter to number, how return to letter Ron Excel Discussion (Misc queries) 2 May 9th 05 08:34 PM


All times are GMT +1. The time now is 06:03 PM.

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

About Us

"It's about Microsoft Excel"