ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Combine 2 formulasinto 1. (https://www.excelbanter.com/excel-worksheet-functions/56049-combine-2-formulasinto-1-a.html)

Steved

Combine 2 formulasinto 1.
 
Hello from Steved

How can I please combine the below Formulas into one

=SUM(IF(Kilometres!$D$1:$D$4999={"82MAN-SG220","83MAN-SG220","88MAN-SG240","89MAN-SG240","90MAN-SG240"},IF(Kilometres!$E$1:$E$4999="City
Depot",Kilometres!$C$1:$C$4999,0),0))

=SUM(IF(Kilometres!$D$1:$D$4999={"82MAN-SG220","83MAN-SG220","88MAN-SG240","89MAN-SG240","90MAN-SG240"},IF(Kilometres!$E$1:$E$4999="Roskill
Depot",Kilometres!$C$1:$C$4999,0),0))

Thankyou.

Biff

Combine 2 formulasinto 1.
 
Hi!

Put all these variables in a list somewhere,say, A1:A5

82MAN-SG220
83MAN-SG220
88MAN-SG240
89MAN-SG240
90MAN-SG240

These also,say, B1:B2

City Depot
Roskill Depot

Normally entered:

=SUMPRODUCT(--(ISNUMBER(MATCH(Kilometres!$D$1:$D$4999,A1:A5,0))) ,--(ISNUMBER(MATCH(Kilometres!$E$1:$E$4999,B1:B2,0))) ,Kilometres!$C$1:$C$4999)

Biff

"Steved" wrote in message
...
Hello from Steved

How can I please combine the below Formulas into one

=SUM(IF(Kilometres!$D$1:$D$4999={"82MAN-SG220","83MAN-SG220","88MAN-SG240","89MAN-SG240","90MAN-SG240"},IF(Kilometres!$E$1:$E$4999="City
Depot",Kilometres!$C$1:$C$4999,0),0))

=SUM(IF(Kilometres!$D$1:$D$4999={"82MAN-SG220","83MAN-SG220","88MAN-SG240","89MAN-SG240","90MAN-SG240"},IF(Kilometres!$E$1:$E$4999="Roskill
Depot",Kilometres!$C$1:$C$4999,0),0))

Thankyou.




Steved

Combine 2 formulasinto 1.
 
Thanks Biff

"Biff" wrote:

Hi!

Put all these variables in a list somewhere,say, A1:A5

82MAN-SG220
83MAN-SG220
88MAN-SG240
89MAN-SG240
90MAN-SG240

These also,say, B1:B2

City Depot
Roskill Depot

Normally entered:

=SUMPRODUCT(--(ISNUMBER(MATCH(Kilometres!$D$1:$D$4999,A1:A5,0))) ,--(ISNUMBER(MATCH(Kilometres!$E$1:$E$4999,B1:B2,0))) ,Kilometres!$C$1:$C$4999)

Biff

"Steved" wrote in message
...
Hello from Steved

How can I please combine the below Formulas into one

=SUM(IF(Kilometres!$D$1:$D$4999={"82MAN-SG220","83MAN-SG220","88MAN-SG240","89MAN-SG240","90MAN-SG240"},IF(Kilometres!$E$1:$E$4999="City
Depot",Kilometres!$C$1:$C$4999,0),0))

=SUM(IF(Kilometres!$D$1:$D$4999={"82MAN-SG220","83MAN-SG220","88MAN-SG240","89MAN-SG240","90MAN-SG240"},IF(Kilometres!$E$1:$E$4999="Roskill
Depot",Kilometres!$C$1:$C$4999,0),0))

Thankyou.






All times are GMT +1. The time now is 04:06 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com