Jump to content

Recommended Posts

Posted (edited)

Ok let me try to explain this

I have an input box on a loop to enter names, as i have over 200 names to enter on a weekly basis

how can i get the macro to move down a cell for each entry from the input box

this is what i have so far

sub rota()

RO = 1

START:

ent = ("enter name for rota e1a0")

ent = ent & RO

E1A = InputBox(ent, "ENTER NAMES")

If E1A = "QUIT" Then Exit Sub

RO = RO + 1

Worksheets(1).Range("b5").Value = E1A

GoTo START

End Sub

so first time input is for rota e1a01

second time input is for rota e1a02

and so on up to 242

rota numbers from e1a01 to e1a242 are in coloum A names from input box need to be in coloum B

so its the ("b5") in Worksheets(1).Range("b5").Value = E1A that i need to increase each time

Well i understand what i mean :blink: hope you do

Edited by discarnet

Posted

DON'T WORRY ABOUT IT WORKED IT OUT :)

Sub na()

ro = 1

START:

For x = 5 To 100

ent = ("enter name for rota e1a0")

ent = ent & ro

e1a = InputBox(ent, "ENTER NAMES")

If e1a = "QUIT" Then Exit Sub

Cells(x, 2) = e1a

ro = ro + 1

Next x

End Sub

Thanks for looking anyway :thumbup

  • 6 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...