radio buttons determining cell values with 2 sets of equations, the first half of the formula works, but second half doesn't

Larry1225

New Member
Joined
Nov 4, 2024
Messages
1
Office Version
  1. 2013
Platform
  1. Windows
I am trying to make radio buttons control the outcome of a formula, based on the choice of the button and the contents of a dropdown. The first half of the formula works, but the second half doesn't work, I end up with a "false". I am looking to have two radio buttons determine the use of specific multipliers.

Both buttons are referencing cell J30, all equations are referencing cell J33 which uses a dropdown list. J33 is a number of months ranging from 0 months (purchase) to 63 months. (If J33 = 36 months and J30=1 use 0.0307) but (if J33=36 and J30=2 use 0.034), etc....
So I want it to be... if J30 is 1 use the first group of equations (equations in bold), if J30 is 2 use equations in group B (equations italicized).
Group A (in bold) works fine, but group B (italicized) does not.

Here is the formula I am using... any ideas what I'm missing? What am I doing wrong??

=IF($J$30=1,IF(J33="purchase",0,IF(J33="12",0.0778,IF(J33="24",0.0424,IF(J33="36",0.0307,IF(J33="39",0.0283,IF(J33="48",0.0247,IF(J33="60",0.0206,IF(J33="63",0.02,**IF($J$30=2,IF(J33="purchase",0,IF(J33="12",0.00908,IF(J33="24",0.0488,IF(J33="36",0.034,IF(J33="39",0.0319,IF(J33="48",0.0271,IF(J33="60",0.0229,IF(J33="63",0.0221,0))))))))))))))))))

I have tried separating the two formulas, closing the first,("=" the second, and a plethora of other variations... I'm stumped.
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
this is how your formula looks.
Excel Formula:
=IF($J$30=1,
' this is true part for J30=1
  IF(J33="purchase",0,
    IF(J33="12",0.0778,
      IF(J33="24",0.0424,
        IF(J33="36",0.0307,
          IF(J33="39",0.0283,
            IF(J33="48",0.0247,
              IF(J33="60",0.0206,
                IF(J33="63",0.02,
                  IF($J$30=2,
'this is true part but will never be calculated, because you are still inside true part of J30=1
                    IF(J33="purchase",0,
                      IF(J33="12",0.00908,
                        IF(J33="24",0.0488,
                          IF(J33="36",0.034,
                            IF(J33="39",0.0319,
                              IF(J33="48",0.0271,
                                IF(J33="60",0.0229,
                                  IF(J33="63",0.0221,0)
                                )
                              )
                            )
                          )
                        )
                      )
                    )
' here could go false part for J30=2
                  )
                )
              )
            )
          )
        )
      )
    )
  )
'and here false part for J30=1 
)
so you are really missing false for first if J30=1 thus case of J30=2 is never evaluated.

One could add 0 in
Excel Formula:
                IF(J33="63",0.02,0)
and add closing brackets after it (and remove from bottom part.

But my proposition (having in ming that you are using version 2013) would be to build helper table like
selector 1 2 <-this is header row
purchase 0 0
12 0.0778 0.00908
24 0.0424 0.0488

and so on. Let's assume this helper table (could be also in a hidden sheet, or in hidden collumns far right in the same sheeet) is in columns R:T and starts in row 1, so 12 is in R3 and so on.
Excel Formula:
=INDEX($S$2:$T$9,MATCH(J33,$R$2:$R$9,0),MATCH($J$30,$S$1:$T$1,0))
or a bit more developed
Excel Formula:
=IFERROR(INDEX($S$2:$T$9,MATCH(J33,$R$2:$R$9,0),MATCH($J$30,$S$1:$T$1,0)),"Match for " & J33 & " and " & $J$30 & " not found")
 
Upvote 0

Forum statistics

Threads
1,224,813
Messages
6,181,111
Members
453,021
Latest member
Justyna P

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