Logical Formula involving 5 cells

sanket_sk

Board Regular
Joined
Dec 27, 2016
Messages
140
Office Version
  1. 365
Platform
  1. Windows
Dear All,

I am working on logical calculation where logic will involve 5 cells, can anybody help me build logic using below statement / Table

1> if City is Delhi , Indore -If type of work is "Polish" Purpose is "Preventive" Location of the work is "Field" Payment should be on Turn around time -- < 2- 70 , >2<4- 50, >4<6-30, >6=0

2> if City is Delhi , Indore- If type of work is "Polish" Purpose is "Regular" Location of the work is "Workshop" Payment should be on Turn around time -- < 2- 50 , >2<4- 30, >46=0

3> if City is Delhi , Indore - If type of work is "Cleaning or Finish" Purpose is "Preventive" Location of the work is "Hospital" Payment should be on Turn around time -- < 2- 60 , >2<4- 40, >4<6-30, >6=0

4> if City is Delhi , Indore- If type of work is "Cleaning or Finish" Purpose is "Regular" Location of the work is "Hospital" Payment should be on Turn around time -- < 2- 50 , >2<4- 40, >4<6-20, >6=0

5> if City is other than Delhi , Indore -If type of work is "Polish" Payment should be on Turn around time -- < 2- 20 , >2<3- 0, >4=0

6> if City is other than Delhi , Indore - If type of work is "Cleaning or Finish" Payment should be on Turn around time -- < 2- 30 , >2<4- 20, >4<6-10, >6=0

Sanket
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
try this


Book1
ABCDEFG
1Turn around time/Payment
2CityTypePurposeLocation<22-44-6
3Delhi , IndorePolishPreventiveField705030
4Delhi , IndorePolishRegularWorkshop50300
5Delhi , IndoreCleaningPreventiveHospital604030
6Delhi , IndoreFinishPreventiveHospital604030
7Delhi , IndoreCleaningRegularHospital504020
8Delhi , IndoreFinishRegularHospital504020
9OthersPolish20
10OthersCleaning302010
11OthersFinish302010
12
13
14
15CityTypePurposeLocationTurn around timePayment
16Delhi , IndoreFinishRegularHospital340
17LondonCleaning510
Sheet5
Cell Formulas
RangeFormula
F16=IF(A16="Delhi , Indore",SUMPRODUCT(--($B$3:$B$8=B16)*($C$3:$C$8=C16)*($D$3:$D$8=D16),INDEX($E$3:$I$8,,MATCH(E16,{0,2,4,6}))),SUMPRODUCT(--($B$9:$B$11=B16),INDEX($E$9:$I$11,,MATCH(E16,{0,2,4,6}))))
 
Upvote 0
Dear Alan,

Thanks for quick response but we have limitation of combining cities as you mentioned
Data is going to be more than 60k lines, secondly we have more than 60 cities which we need to map with different payment structure which cannot be combined in separate cell, please suggest formula without adding any information in existing sheet, we are OK with VBA as weel.

Thanks & Regards,
Sanket
 
Upvote 0
Dear Alan,

Thanks for quick response but we have limitation of combining cities as you mentioned
Data is going to be more than 60k lines, secondly we have more than 60 cities which we need to map with different payment structure which cannot be combined in separate cell, please suggest formula without adding any information in existing sheet, we are OK with VBA as weel.

Thanks & Regards,
Sanket

well, the suggestion in post#2 is based on the info on post#1.
if you have more cites payment structure you just have to extend the table at the top
 
Upvote 0
what you needed is to include the check of city, like this

Code:
=IF(A16="Delhi , Indore",SUMPRODUCT(--[COLOR="#FF0000"]($A$3:$A$8=A16)[/COLOR]*($B$3:$B$8=B16)*($C$3:$C$8=C16)*($D$3:$D$8=D16),INDEX($E$3:$I$8,,MATCH(E16,{0,2,4,6}))),SUMPRODUCT(--($B$9:$B$11=B16),INDEX($E$9:$I$11,,MATCH(E16,{0,2,4,6}))))
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
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