Several formulas into one cell.

daza34

Board Regular
Joined
Feb 14, 2017
Messages
70
I have multiple cells which have formulas in below

Cell

AW - =DAY(DATE(YEAR(L2),MONTH(L2)+1,0))
AX- =DATE(YEAR(L2),MONTH(L2)+1,0)-L2+1
AY - =EOMONTH(L2,0)
AZ - =DAY(DATE(YEAR(M2),MONTH(M2)+1,0))
BA - =EOMONTH(M2,0)
BB - =BA2-M2
BC - =AZ2-BB2
BD - =IF(BB2= 0,0,X2/AZ2*BC2)
BE - =DATEDIF(L2,M2,"m")+IF(AND(EOMONTH(M2,0)=M2,DAY(L2)>DAY(M2)),1,0)
BF - =X2*BE2
BG - =X2/AW2*AX2
BH - =BG2+BF2+BD2
BI - =IF(W2=0,"0",O2-BH2)

The final result is in cell BI and i have resorted to hiding them at the moment but is there any chance of getting all of this in one cell?

Any help would be appreciated:smile:
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
That would be one heck of a formula, and a nightmare to try to debug and modify!
I would recommend creating a User Defined Function (UDF) in VBA instead, if you want a single formula to do it.

Someone may be able to come up with a better/simpler formula, but I think you would just need to explain in plain English exactly what this formula is supposed to be doing.
I don't know if you will find too many people who try to figure that out by looking at all those formulas.
 
Upvote 0
It can certainly be done, if you are not opposed to using VBA and a UDF.
I like using that methodology, as you can add comments/documentation in your code to explain what is going on.
It is easier to read, and if you ever need to change anything, you only have to change it in one place.
 
Upvote 0

Forum statistics

Threads
1,223,909
Messages
6,175,312
Members
452,634
Latest member
cpostell

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