Editable Text Based on Drop Down List

rxharp419

Board Regular
Joined
Mar 12, 2015
Messages
58
Hello,

I would like to have a drop-down list in A1.

Based on the value selected in the drop-down list in A1, I would like a specific parage of text to pop up in A2. I would like for this text in A2 to be editable so minor things can be changed as needed.

Is this possible?
 
Try this:
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Row = 1 And Target.Column = 14 Then
If Target.Value = "Estimate" Then TextBox6.Value = Sheets("Wages & Rates").Range("J16").Value
If Target.Value = "Lump Sum" Then TextBox6.Value = Sheets("Wages & Rates").Range("J17").Value
End If
End Sub
 
Upvote 0

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Try this:
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Row = 1 And Target.Column = 14 Then
If Target.Value = "Estimate" Then TextBox6.Value = Sheets("Wages & Rates").Range("J16").Value
If Target.Value = "Lump Sum" Then TextBox6.Value = Sheets("Wages & Rates").Range("J17").Value
End If
End Sub

I got run time error 424 and "Object required".

Also, the value in N1 is pulling from another sheet now, "Input"C2. Does it make a difference? Sorry for all of the missing details here.

The debug option highlighted this row

If Target.Value = "Lump Sum" Then TextBox6.Value = Sheets("Wages & Rates").Range("J17").Value
 
Upvote 0
Not sure what your saying.
You said it was working earlier all I changed was enter value into TextBox6.

And what does this mean:
Also, the value in N1 is pulling from another sheet now, "Input"C2

Are you now saying you want the input cell to be Range("C2") ?
 
Upvote 0
Not sure what your saying.
You said it was working earlier all I changed was enter value into TextBox6.

And what does this mean:
Also, the value in N1 is pulling from another sheet now, "Input"C2

Are you now saying you want the input cell to be Range("C2") ?

Hi, Yes it was working earlier and it still does work if i do the original you sent me.

For some reason, no text will populate into that text box.

Yes, the value in N1 in the quote sheet is actuall "=Input!C2". So it is based off of information that sheet. I did not know if that would stop it from working or not.
 
Upvote 0
I'm not sure why we keep having problems here but you said earlier "N1" was the input cell now you have changed it to "C2" yes these changes make a different. Try this. If you want to change it again look in the script and change it you will see it on the first line of the script.

Are you now saying this is going to be constantly changing. If so you need to explain.

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("C2")) Is Nothing Then
If Target.Value = "Estimate" Then TextBox6.Value = Sheets("Wages & Rates").Range("J16").Value
If Target.Value = "Lump Sum" Then TextBox6.Value = Sheets("Wages & Rates").Range("J17").Value
End If
End Sub
 
Upvote 0
I'm not sure why we keep having problems here but you said earlier "N1" was the input cell now you have changed it to "C2" yes these changes make a different. Try this. If you want to change it again look in the script and change it you will see it on the first line of the script.

Are you now saying this is going to be constantly changing. If so you need to explain.

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("C2")) Is Nothing Then
If Target.Value = "Estimate" Then TextBox6.Value = Sheets("Wages & Rates").Range("J16").Value
If Target.Value = "Lump Sum" Then TextBox6.Value = Sheets("Wages & Rates").Range("J17").Value
End If
End Sub

Yes, I originally it was N1 was the cell that had the value. But because my lack of Knowlege i was asking you does it matter if we still use N1 in the code even though N1 is actually pulling its value from another cell in another worksheet. N1 = the value that is in the "Input" sheet (another sheet in the workbook, =Input!C2) which is only ever going to be "Estimate or Lump Sum".

The text box name is "textbox6" please note lowercase. I tried changing the text box name to "TextBox6" like in the code and remove but it still does not work. Does the case matter?
 
Upvote 0
This script will only activate when you manually enter a value into some cell. I explained earlier if you change the cell you plan to manually enter a value into you need to change the script and yes case is important.
 
Upvote 0
This script will only activate when you manually enter a value into some cell. I explained earlier if you change the cell you plan to manually enter a value into you need to change the script and yes case is important.

I understand now that it must be manually entered. Is there a way we can have it work off of a drop down list on the Input sheet in C2? The text box name is "textbox6"?
 
Upvote 0
It does not matter if it's a drop down list. The current script works for "C2"
Then you need to change your TextBox name to "TextBox6"

I'm not going to keep changing the script.
 
Upvote 0
It does not matter if it's a drop down list. The current script works for "C2"
Then you need to change your TextBox name to "TextBox6"

I'm not going to keep changing the script.
My only problem is it works for C2 on the quote sheet. I need the the language for C2 on the Input sheet. Its on another sheet. Can you please tell me how to do?
 
Upvote 0

Forum statistics

Threads
1,223,238
Messages
6,170,939
Members
452,368
Latest member
jayp2104

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top