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: 10
Default Sequential looping

Group,

I am stuck on a problem in looping. Im trying to make it
so that I do not have to write 5 procedures for the 5
different Variables. But im getting an error with my
integer changing and the macro recognizing it as a
variable.

Thanks in advance


Fish

'''''Code

Dim x as integer
Dim Med1 As String, Med2 As String, Med3 As String, Med4
As String, Med5 As String


Med2 = "Advil"
Med3 = "Aleve"
Med4 = "Aspirin"
Med5 = "NyQuil"
Med6 = "Day Quil"

x = 1

Do
Med = Med1 + x
ActiveCell.Offset(0, -1).Value = Med
ActiveCell.Offset(1, 0).Select
x = x + 1
Loop Until ActiveCell.Offset(-1, -1).Value = Med6

 
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
Sequential Numbers abcdexcel Excel Discussion (Misc queries) 3 January 18th 06 11:06 AM
sequential numbers Harley Excel Worksheet Functions 1 January 12th 06 09:57 PM
sequential numbers AndrewRichardWood Excel Discussion (Misc queries) 2 July 20th 05 05:00 PM
Non-sequential VLOOKUP function -OR- sequential sort of web query Eric S Excel Worksheet Functions 1 February 28th 05 07:50 PM
Sequential names on Sequential pages Salt4 Excel Worksheet Functions 2 November 12th 04 04:24 PM


All times are GMT +1. The time now is 11:14 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"