Solved: Input multiple data in one cell for a macro

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

yrobins

Thread Starter
Joined
Apr 17, 2010
Messages
3
Hi Everyone: I am trying to create a macro, that allows me to enter multiple data in one cell, I just do not know VBA at all but I know Excel well. Here is an example of how the data should look "C02Ex04". I need 2 input pauses for this.
The number "2" refers to a chapter and will be between 1-11. The "04" refers to the exercise number and will be between 1-9. My challenge in the macro, is allowing the second input, I don't know how to activate an F2 command to keep the cell active for more input.

Thank you
 
Joined
Jul 25, 2004
Messages
5,458
Hello there, welcome to the board!

Not really sure if I follow you. Are you solely trying to do this via VBA? Where does the data come from? Where do you enter it? If you have a value as a variable in VBA, you can append simply...
Code:
With Sheets("Sheet1").Range("A1")
    .Value = .Value & YourVariableOrValueHere
End With
But other than that, not sure what you have. More of an explanation of your process and what you are doing would help.

HTH
 

yrobins

Thread Starter
Joined
Apr 17, 2010
Messages
3
Thanks for replying:

What I am trying to convey is that I attempted to enter data manually in one cell. I have hundreds of entries to enter with the pattern described above. I attempted to enter "just" a macro in Excel to do this, but it appears that a macro does not stay in edit mode for me to add two changes of data in one cell. So I was exploring in vba after looking at several posts on a "pause" command. Been looking at code for two days most vba codes only give me half of the results that I am looking for.

So I can be entering data like this:

C01Ex04
C01Ex06
C02Ex01
C02Ex06

Where the 3rd digit equals the chapter and the last 2 digits refer to an exercise number. This all goes into one cell. I would like a prompt or pause, to enter these two data changes in one cell.

Doses this help?
 

Keebellah

Hans
Trusted Advisor
Joined
Mar 27, 2008
Messages
6,639
I did some simple coding, The yellow area will trigger the macro with a promt if you wish to enter data

As long as you put text it will add it to the current cell.
It only works when you use the OK button, I'm sure others have the solution for that but as long as you use the OK and are in the yellow region it does what I think you want.

Try it and let us know.
 

Attachments

yrobins

Thread Starter
Joined
Apr 17, 2010
Messages
3
Thanks for your help, got the hang of how your prompt code works and this will do the trick.
 
Joined
Jul 25, 2004
Messages
5,458
Why don't you just enter the data in two different cells and use a third column to concatenate the values? I.e. look up CONCATENATE() function.
 
Joined
Jul 25, 2004
Messages
5,458
True, Hans, very true. And I may not fully understand the entirety of the scope either. IMHO if there's a simpler way to do things without VBA (which, to me, isn't always the case ;) ) we should at least explore that route. :)
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Members online

Top