How do I fill up a table from an imput panel?

  • Thread starter Thread starter Lii
  • Start date Start date
L

Lii

The idea is to fill up a long table without going to the cell
themselves, but rather by specifying the value and the cell itd g
into.
PLzHel
 
Hi,
I am not sure what you are saying but if you could send me
a sample sheet, maybe I could write a macro to suit. I am
assuming you mean a userform. You can see some of my stuff
at
http://www.geocities.com/excelmarksway

email:
(e-mail address removed)

regards
Mark
 
Open the VB Editor (Alt + F11), next to the project explorer right
click,
Insert-> Module


Double Click the Module, add the following procedure:


Sub AssignValueToCell()

TargetCell = InputBox("Enter Target Cell")
NewValue = InputBox("Enter Value For Cell " & TargetCell)
Range(TargetCell).Value = NewValue

End Sub

Close the VB Editor, then go to
Tools->Macros-> AssignValueToCell
 
Since you're using a nice table, you may want to try Data|Form.

And if that's too restrictive, John Walkenbach has an enhanced form that's even
nicer:

http://j-walk.com/ss/dataform/index.htm

The code is available if you want to see the secrets (and modify it for your
use!).
 
Thanx a lot to all of you for your help!

CRISPBD, I found your reply particularly usefull, but could you pleas
help me introduce a little variation to the code you proposed?

Instead of assigning the target Cell in the format Letter, Numbe
(example: A1), Id like to introduce it in the format X-Parameter
Y-Parameter of my table (example: Month, Day of the Month). This i
because the user wont know the cell he has to introduce the value to
but rather which day hes got to introduce the value to.

Is this possible?
Hope i made myself clear. Thanx a lot for your help
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top