What IF statements.

fishcakes

New Member
Joined
Jun 20, 2016
Messages
23
Office Version
  1. 365
Platform
  1. Windows
Not to sure if this the IF statement formula should be used or not, however this is what I am trying to solve...

B2: Cost drop down selections/options are either Y or N.
Based up on what is selected in B2, I would like to have the following drop/selections in B3:
If B2 = Y, then B3 dropdown selctions/options are either 'Monthly' or 'Annually'.
If B2 = N, then B3 dropdown selection is 'N'


1705459612932.png
 

Attachments

  • 1705459215205.png
    1705459215205.png
    1.6 KB · Views: 6

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Not really sure what you are after

Book1
ABCDEFG
1B2 ListB3 List
2CostYYMonthly
3TypeMonthlyNAnnually
Sheet1
Cell Formulas
RangeFormula
G2G2=IF($B$2="N","N","Monthly")
G3G3=IF($B$2="N","N","Annually")
Cells with Data Validation
CellAllowCriteria
B2List=$F$2:$F$3
B3List=$G$2:$G$3
 
Upvote 0
Book1
ABCDEF
1B3 List
2CostYMonthly
3TypeMonthlyAnnually
Sheet1
Cell Formulas
RangeFormula
F2F2=IF($B$2="N","NA","Monthly")
F3F3=IF($B$2="N","NA","Annually")
Cells with Data Validation
CellAllowCriteria
B2ListY,N
B3List=$F$2:$F$3
 
Upvote 0
Does something like this work for you? I would also have a worksheet change event to empty cell B3 whenever there's a change in B2.
Book1
ABCDE
1
2COSTYannualN/A
3TypeMonthly
4
5
Sheet1
Cells with Data Validation
CellAllowCriteria
B2ListY,N
B3List=IF(B2="Y",$D$2:$D$3,$E$2)


Worksheet change code:
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    If Not Intersect(Range("B2"), Target) Is Nothing Then
        Application.EnableEvents = False
        [B3].Select: [B3] = ""
        Application.EnableEvents = True
    End If
End Sub

Picture1.pngPicture2.png
 
Upvote 0
Solution

Forum statistics

Threads
1,223,234
Messages
6,170,891
Members
452,366
Latest member
TePunaBloke

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