![]() |
Conditional Statement using a Drop down box
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. |
Conditional Statement using a Drop down box
Try:
=IF(D1="","",INDEX($G$35:$I$35,,MATCH(D1,$F$36:$F$ 38,0))) -- Max Singapore http://savefile.com/projects/236895 xdemechanik --- "Meeffas" wrote: 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. |
Conditional Statement using a Drop down box
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 "Meeffas" wrote: 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. |
Conditional Statement using a Drop down box
This worked perfectly. Thank you for the reply.
"Max" wrote: Try: =IF(D1="","",INDEX($G$35:$I$35,,MATCH(D1,$F$36:$F$ 38,0))) -- Max Singapore http://savefile.com/projects/236895 xdemechanik --- "Meeffas" wrote: 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. |
Conditional Statement using a Drop down box
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. "FSt1" wrote: 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 "Meeffas" wrote: 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. |
Conditional Statement using a Drop down box
welcome, good to hear that.
-- Max Singapore http://savefile.com/projects/236895 xdemechanik --- "Meeffas" wrote in message ... This worked perfectly. Thank you for the reply. |
All times are GMT +1. The time now is 04:49 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com