Calculate 2 numbers based on criteria

Russk68

Well-known Member
Joined
May 1, 2006
Messages
589
Office Version
  1. 365
Platform
  1. MacOS
Hi!
I need a formula in column W. 34,25 and 20 are the results needed.
Column V is a unique list from column P.
The formula would index column P and match the fixture type in column V and then subtract the 2 values in column R
TIA!


1WBV2.11.8 copy.xlsm
PQRSTUVW
2Fixture TypeUniverseAddressColorFix. ID.Fixture Type
3Mac Viper Profile 16 bit Extended1001ffffff101Mac Viper Profile 16 bit Extended34
4Mac Viper Profile 16 bit Extended1035ffffff201Mac Aura Extended - Colour Calibration Off25
5Mac Viper Profile 16 bit Extended1069ffffff301Sharpy Vector Lamp on20
6Mac Viper Profile 16 bit Extended1103ffffff0
7Mac Viper Profile 16 bit Extended1137ffffff0
8Mac Viper Profile 16 bit Extended1171ffffff0
9Mac Viper Profile 16 bit Extended2001ffffff0
10Mac Viper Profile 16 bit Extended2035ffffff0
11Mac Viper Profile 16 bit Extended2069ffffff0
12Mac Viper Profile 16 bit Extended2103ffffff0
13Mac Viper Profile 16 bit Extended2137ffffff0
14Mac Viper Profile 16 bit Extended2171ffffff0
15Mac Aura Extended - Colour Calibration Off1205ffffff0
16Mac Aura Extended - Colour Calibration Off1230ffffff0
17Mac Aura Extended - Colour Calibration Off1255ffffff0
18Mac Aura Extended - Colour Calibration Off1280ffffff0
19Mac Aura Extended - Colour Calibration Off1305ffffff0
20Mac Aura Extended - Colour Calibration Off1330ffffff0
21Mac Aura Extended - Colour Calibration Off1355ffffff0
22Mac Aura Extended - Colour Calibration Off1380ffffff0
23Mac Aura Extended - Colour Calibration Off2205ffffff0
24Mac Aura Extended - Colour Calibration Off2230ffffff0
25Mac Aura Extended - Colour Calibration Off2255ffffff0
26Mac Aura Extended - Colour Calibration Off2280ffffff0
27Mac Aura Extended - Colour Calibration Off3201ffffff0
28Mac Aura Extended - Colour Calibration Off3226ffffff0
29Mac Aura Extended - Colour Calibration Off2355ffffff0
30Mac Aura Extended - Colour Calibration Off2380ffffff0
31Mac Aura Extended - Colour Calibration Off2405ffffff0
32Mac Aura Extended - Colour Calibration Off2430ffffff0
33Mac Aura Extended - Colour Calibration Off3001ffffff0
34Mac Aura Extended - Colour Calibration Off3026ffffff0
35Mac Aura Extended - Colour Calibration Off3051ffffff0
36Mac Aura Extended - Colour Calibration Off3076ffffff0
37Mac Aura Extended - Colour Calibration Off3101ffffff0
38Mac Aura Extended - Colour Calibration Off3126ffffff0
39Mac Aura Extended - Colour Calibration Off3151ffffff0
40Mac Aura Extended - Colour Calibration Off3176ffffff
41Mac Aura Extended - Colour Calibration Off4026ffffff
42Mac Aura Extended - Colour Calibration Off4051ffffff
43Mac Aura Extended - Colour Calibration Off4076ffffff
44Mac Aura Extended - Colour Calibration Off4101ffffff
45Mac Aura Extended - Colour Calibration Off4126ffffff
46Mac Aura Extended - Colour Calibration Off4151ffffff
47Mac Aura Extended - Colour Calibration Off4381ffffff
48Mac Aura Extended - Colour Calibration Off4406ffffff
49Mac Aura Extended - Colour Calibration Off4431ffffff
50Mac Aura Extended - Colour Calibration Off4456ffffff
51Sharpy Vector Lamp on4221ffffff
52Sharpy Vector Lamp on4241ffffff
53Sharpy Vector Lamp on4261ffffff
54Sharpy Vector Lamp on4281ffffff
55Sharpy Vector Lamp on4301ffffff
56Sharpy Vector Lamp on4321ffffff
57Sharpy Vector Lamp on4341ffffff
58Sharpy Vector Lamp on4361ffffff
59CuePix Strip Tri 7 channel3251ffffff
60CuePix Strip Tri 7 channel3258ffffff
61CuePix Strip Tri 7 channel3265ffffff
62CuePix Strip Tri 7 channel4176ffffff
63CuePix Strip Tri 7 channel4183ffffff
64Mac 700 Profile Extended3272ffffff
65Mac 700 Profile Extended3303ffffff
66Mac 700 Profile Extended3334ffffff
67Mac 700 Profile Extended4190ffffff
68Base Hazer 004481ffffff
69Base Hazer 004483ffffff
MA2Import
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Given that the fixture types appear many times and you only appear to be looking at the first 2 instances each time, are we able to assume that this is a constant or is there another criteria for identifying the correct 2 rows?

edit:-

Adding in one quick formula, there are many ways to get the same result.
Excel Formula:
=SUMPRODUCT(INDEX(FILTER($R$3:$R$69,$P$3:$P$69=V3),{1,2}),{-1,1})
 
Last edited:
Upvote 0
Do you always want to subtract the 1st value from the 2nd?
 
Upvote 0
If it is always the 1st subtracted from the 2nd, then try
Excel Formula:
=LET(f,FILTER($R$3:$R$69,$P$3:$P$69=V3),INDEX(f,2)-INDEX(f,1))
 
Upvote 0
Solution
Given that the fixture types appear many times and you only appear to be looking at the first 2 instances each time, are we able to assume that this is a constant or is there another criteria for identifying the correct 2 rows?

edit:-

Adding in one quick formula, there are many ways to get the same result.
Excel Formula:
=SUMPRODUCT(INDEX(FILTER($R$3:$R$69,$P$3:$P$69=V3),{1,2}),{-1,1})
This is a constant.
I'll give it a try. Thank you!
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,322
Members
452,635
Latest member
laura12345

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