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

I need a loop macro ( I have zero experience with them)...

Application.AutoCorrect.AddReplacement
_What:=Range("a1"),Replacement:=Range("c1")

I need a loop that will continue to add that list (cell A1 will get replaced
with data in Cell C1) to my AutoCorrect until there is no value in the
current cell in column A

Thanks in advance for any help!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Loop function

Try:

Sub autoset()
For i = 1 To 65536
If IsEmpty(Cells(i, "A")) Then
Exit Sub
End If
Application.AutoCorrect.AddReplacement What:=Cells(i, "A"),
Replacement:=Cells(i, "C")
Next
End Sub

--
Gary's Student


"jweasl" wrote:

I need a loop macro ( I have zero experience with them)...

Application.AutoCorrect.AddReplacement
_What:=Range("a1"),Replacement:=Range("c1")

I need a loop that will continue to add that list (cell A1 will get replaced
with data in Cell C1) to my AutoCorrect until there is no value in the
current cell in column A

Thanks in advance for any help!

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default Loop function

AddReplacement method of AutoCorrect class failed ..... bummer :-(


"Gary''s Student" wrote:

Try:

Sub autoset()
For i = 1 To 65536
If IsEmpty(Cells(i, "A")) Then
Exit Sub
End If
Application.AutoCorrect.AddReplacement What:=Cells(i, "A"),
Replacement:=Cells(i, "C")
Next
End Sub

--
Gary's Student


"jweasl" wrote:

I need a loop macro ( I have zero experience with them)...

Application.AutoCorrect.AddReplacement
_What:=Range("a1"),Replacement:=Range("c1")

I need a loop that will continue to add that list (cell A1 will get replaced
with data in Cell C1) to my AutoCorrect until there is no value in the
current cell in column A

Thanks in advance for any help!

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Loop function

I got it to work with

nkee in A1
and
knee in C1

Make sure your substitutions are all valid and don't repeat.
--
Gary's Student


"jweasl" wrote:

AddReplacement method of AutoCorrect class failed ..... bummer :-(


"Gary''s Student" wrote:

Try:

Sub autoset()
For i = 1 To 65536
If IsEmpty(Cells(i, "A")) Then
Exit Sub
End If
Application.AutoCorrect.AddReplacement What:=Cells(i, "A"),
Replacement:=Cells(i, "C")
Next
End Sub

--
Gary's Student


"jweasl" wrote:

I need a loop macro ( I have zero experience with them)...

Application.AutoCorrect.AddReplacement
_What:=Range("a1"),Replacement:=Range("c1")

I need a loop that will continue to add that list (cell A1 will get replaced
with data in Cell C1) to my AutoCorrect until there is no value in the
current cell in column A

Thanks in advance for any help!

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default Loop function

Weird, I tried it again and it worked.... I didn't change anything either.
Thanks a million!!

"Gary''s Student" wrote:

I got it to work with

nkee in A1
and
knee in C1

Make sure your substitutions are all valid and don't repeat.
--
Gary's Student


"jweasl" wrote:

AddReplacement method of AutoCorrect class failed ..... bummer :-(


"Gary''s Student" wrote:

Try:

Sub autoset()
For i = 1 To 65536
If IsEmpty(Cells(i, "A")) Then
Exit Sub
End If
Application.AutoCorrect.AddReplacement What:=Cells(i, "A"),
Replacement:=Cells(i, "C")
Next
End Sub

--
Gary's Student


"jweasl" wrote:

I need a loop macro ( I have zero experience with them)...

Application.AutoCorrect.AddReplacement
_What:=Range("a1"),Replacement:=Range("c1")

I need a loop that will continue to add that list (cell A1 will get replaced
with data in Cell C1) to my AutoCorrect until there is no value in the
current cell in column A

Thanks in advance for any help!



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
Does loop function cause this problem? Eric Excel Worksheet Functions 3 July 1st 07 01:40 PM
VBA - Loop a Function [email protected][_2_] Excel Programming 2 May 16th 06 05:38 PM
If-Else Simple Loop function Junior728 Excel Programming 3 August 1st 05 09:27 AM
Loop Function unable to loop Junior728 Excel Programming 1 July 28th 05 10:23 AM
Need function for checkbox in loop Matt Excel Programming 7 January 14th 04 03:29 AM


All times are GMT +1. The time now is 10:17 AM.

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"