Formulas not working

Adam1258

New Member
Joined
Jan 16, 2025
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hello,

I am trying to write a multi-function / multiple criteria formula and have tried both index match & xlookup but cannot get the formula to work. If I break the formula down into component parts then each component part seems to work but put these sections together into one formula and it will not work.

Referring to my uploaded image:

1) First part of the formula needs to check the value in col. C (fixed rate) if it is greater than the corresponding value in col. L (for both year & code combined). If it is greater then output in col. C needs to say text: "Fixed rate".

2) If the value in col. C is less than the corresponding value in col. L then the formula needs to be =(Corresponding value in col. L minus col. C) / corresponding value in col. L to give the answer as a % in col. B.

3) I have tried the following formulas but none are working:

=IF(C3>INDEX(L3:L24,MATCH(1,(I3:I24=A3)*(J3:J24=D3),0)),"£"&C3&" Fixed rate")*(XLOOKUP(1,(I3:I24=A3)*(J3:J24=D3),L3:L24)-C3)/XLOOKUP(1,(I3:I24=A3)*(J3:J24=D3),L3:L24) gives me an answer of 0.00% but needs to be 38.00%. Note that there should be a "," not a "*" between "Fixed Rate" & (XLOOKUP....). Each time I type a comma then press enter, Excel changes the comma to a "*" in the formula.

{=IF(C3>INDEX(L3:L24,MATCH(1,(I3:I24=A3)*(J3:J24=D3),0)),"£"&C3&" Fixed rate")*(XLOOKUP(1,(I3:I24=A3)*(J3:J24=D3),L3:L24)-C3)/XLOOKUP(1,(I3:I24=A3)*(J3:J24=D3),L3:L24)} same answer as above.

=IF(C4>XLOOKUP(1,(I3:I24=A4)*(J3:J24=D4),L3:L24),"Fixed Rate")*((XLOOKUP(1,(I3:I24=A4)*(J3:J24=D4),L3:L24-C4)/XLOOKUP(1,(I3:I24=A4)*(J3:J24=D4),L3:L24))) but again, Excel converts the "," to a "*" and the value brings back an error.

I have tried one or two other permutations of these formulas but cannot get it to work.

Can anyone please suggest an answer even if it means using a different formula. Thanks in advance.
 

Attachments

  • Dummy Data.png
    Dummy Data.png
    63.4 KB · Views: 8

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Hi, welcome to the forum!

Here's one way you could try.

Book1
ABCDEFGHIJKL
1
2YearConverted to %Fixed RateCodeYearCodeFixed Rate
3202438%65.1100020251000109.2
42024Fixed Rate109.2100020251001109.2
5202417%105100120251002131
6202429%90100220251003131
720251004109.2
82025200073.8
920252000S73.8
102025200173.8
11202520021.88
12202520101.88
1320252010S105
1420241000105
1520241001126
1620241002126
1720241003126
182024100471
192024200071
2020242000S71
212024200171
222024200271
23202420101.81
2420242010S1.81
Sheet1
Cell Formulas
RangeFormula
B3:B6B3=LET(x,XLOOKUP(1,($I$3:$I$24=A3)*($J$3:$J$24=D3),$L$3:$L$24),IF(C3>x,"Fixed Rate",(x-C3)/x))
 
Upvote 0
Solution

Forum statistics

Threads
1,225,626
Messages
6,186,089
Members
453,336
Latest member
Excelnoob223

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