Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Forms - Combining 2 Fields into a Third

Status
Not open for further replies.
Feb 20, 2008
36
Hi all,

I am trying to design an excel form that basically solicits input from the user via a series of input options on an excel form. These are:

1. Field Name is "Planted Date" and it's selected via a date time picker. I would like to extract the month and year from that. Let's assume the user selected 12/16/08.

2. Field name is "Crop type" and this is selected via a combo box. Let's say the user selected "Solo".

3. The field I want to populate would pull the month and year and concantenate the Crop type. The end result I'm looking for, based on the example, is for this box to contain "1208 Solo" based on the user selections.

I hope this is sufficient detail to assist me.

Thank you in advance.
 
if i can assume you have set hte linkedcell property of each control to a1 & a2 respectively then this should work
=text(a1,"mmyy")&a2

;-)
If a man says something and there are no women there to hear him, is he still wrong? [ponder]
How do I get the best answers?
 
But what if the data is not on the worksheet but is actually selected on the form via a datetime picker and combo box, with the intention of inserting the concantenated result on the worksheet?
 
Loomah I think I get what you're saying now.

I ws trying to do this through the VBA form and not actually the form controls in Excel.

I was hoping to keep it off the sheet and just execute via the VBA form and insert the end result back into the workbook.
 
in that case i'd assume that you need to retrieve the value returned by the calender and the value of the combo and apply something like

[a3] = format(me.cal.value, "mmyy")& me.combo.text

using, probably, the click event of a command button on the userform.

but this isn't tested......!

;-)
If a man says something and there are no women there to hear him, is he still wrong? [ponder]
How do I get the best answers?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top