Conditional Statement using a Drop down box

M

Meeffas

I started witha dropdown box. The user will select one of the 3 conditions
(Balanced, Offensive, Defensive). Using that response the information
inserted into other cells using predetermined data. What I have so far isn't
working, I get a Naming error.

=IF D1=F36,then display G35, else IF D1=F37, then display H35, else display
I35

F36,F37, and F38 are the three choices in the drop down box and G35, H35 and
I35 is the information I would like to put into my other cell. Thank you.
 
F

FSt1

hi,
your post is slightly confusing. where is the "other cell"? what do you mean
by "Display"? Is the dropdown box on a form or on the sheet?

assuming sheet and C10 As display, put this code in your dropdown box.
Private Sub cb1_Change()
If cb1.Value = "Balanced" Then
Range("C10").Value = Range("G35").Value
Else
If cb1.Value = "Offencive" Then
Range("C10").Value = Range("H35").Value
Else
If cb1.Value = "Defencive" Then
Range("C10").Value = Range("I35").Value
End If
End If
End If
End Sub
Your dropdown box 's ListFillRange = F36:F38
change to fit our data.
Post back if i got it all wrong.
Regards
FSt1
 
M

Meeffas

That coding went over my head boss. I tried it, but it has been nearly ten
years since I saw visual basic and it's coding so I couldn't figure it out.
Thank you for the effort though, it was appreciated.
 

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

Top