combining formula in one

sachin483

Board Regular
Joined
Mar 31, 2015
Messages
163
Office Version
  1. 2019
Platform
  1. Windows
i have the formula which checks 5 criteria and 2 formula check the other 2 column which i put by (ctrl+shift+del) can we combine both the formula


1. formula


=MIN(MAX(G3*INDEX($S$3:$S$138,L3)%,E3+INDEX($X$3:$X$138,L3)),MAX(G3*INDEX($T$3:$T$138,L3)%,E3+INDEX($Y$3:$Y$138,L3)),MAX(G3*INDEX($U$3:$U$138,L3)%,E3+INDEX($Z$3:$Z$138,L3)),MAX(G3*INDEX($V$3:$V$138,L3)%,E3+INDEX($AA$3:$AA$138,L3)),MAX(G3*INDEX($W$3:$W$138,L3)%,E3+INDEX($AB$3:$AB$138,L3)))




2.formula- array ctrl+shift+del


=MATCH(1,($Q$3:$Q$138=A3)*($R$3:$R$138=B3),0)
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Presumably, your second formula is in L3. You can just put that formula in your first formula wherever you see L3, and confirm it with Control+Shift+Enter. You can switch the formula to a non-array formula by using something like this as your second formula:

=LOOKUP(2,1/(($Q$3:$Q$138=A3)*($R$3:$R$138=B3)),ROW($Q$3:$Q$138)-ROW($Q$3)+1)

However, I don't recommend this course of action! Either version of the second formula is a pretty intensive calculation, you don't want to force the first formula to calculate it 10 times. That's the whole point of helper cells, to calculate some things to make other formulas simpler.

Incidentally, you can shorten your first formula by changing it to an array formula:

=MIN(IF(G3*INDEX($S$3:$W$138,L3,0)%>E3+INDEX($X$3:$AB$138,L3,0),G3*INDEX($S$3:$W$138,L3,0)%,E3+INDEX($X$3:$AB$138,L3,0)))

with Control+Shift+Enter. This uses some nice properties of INDEX, along with the design of your sheet.
 
Upvote 0
Thanks @Eric W the formula is working fine (second formula is in column L) but it is possible to combine this 2 formula's in one
 
Upvote 0
Presumably, your second formula is in L3. You can just put that formula in your first formula wherever you see L3, and confirm it with Control+Shift+Enter. You can switch the formula to a non-array formula by using something like this as your second formula:

=LOOKUP(2,1/(($Q$3:$Q$138=A3)*($R$3:$R$138=B3)),ROW($Q$3:$Q$138)-ROW($Q$3)+1)

However, I don't recommend this course of action! Either version of the second formula is a pretty intensive calculation, you don't want to force the first formula to calculate it 10 times. That's the whole point of helper cells, to calculate some things to make other formulas simpler.

Incidentally, you can shorten your first formula by changing it to an array formula:

=MIN(IF(G3*INDEX($S$3:$W$138,L3,0)%>E3+INDEX($X$3:$AB$138,L3,0),G3*INDEX($S$3:$W$138,L3,0)%,E3+INDEX($X$3:$AB$138,L3,0)))

with Control+Shift+Enter. This uses some nice properties of INDEX, along with the design of your sheet.
Or am I missing your point?
 
Upvote 0
No I was just assuming that helper formula can be added in main formula it can be done
 
Upvote 0

Forum statistics

Threads
1,223,900
Messages
6,175,276
Members
452,629
Latest member
SahilPolekar

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