qtr formula

sachin483

Board Regular
Joined
Mar 31, 2015
Messages
157
Office Version
  1. 2019
Platform
  1. Windows
if all 4 qtr is >= 100 then 20000 , if any 3 qtr > 100 and anl > 105 ach% , then 20000 after matching col1 and col2 with the grid

grid
col1AAABCANL
XX25000200001650013000105
YY20000170001450012000110
data
col1col2QTR1QTR2QTR3QTR4ANLAmount
XXA8412411110810620000
XXA10810111310910820000
XXA10411210310910720000
XXA104105109851010
XXAA93133110110111
XXAA10012211294107
XXB6813311411510716500
XXB101114108105107
XXC10311711810511113000
XXC85119115112108
YYA85125112109108
YYA109102114110109
YYA105113104110108
YYA10011912786108
YYAA94134111111113
YYAA10112311395108
YYB69134115116109
YYB102115109106108
YYC104118119106112
YYC86120116113109

<tbody>
</tbody>
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Not entirely sure that I've understood your request but see if this is what you need..

Excel Workbook
ABCDEFGHIJKLMNO
1col1col2QTR1QTR2QTR3QTR4ANLAmountcol1AAABCANL
2XXA84124111108106,&quot;&gt;=100&quot;)=4,20000,IF(AND(COUNTIF(Table1:],&quot;&gt;=100&quot;)=3,&gt;105),INDEX(Table2,MATCH(,Table2,0),MATCH(,Table2,0)),0))]20000XX25000200001650013000105
3XXA108101113109108,&quot;&gt;=100&quot;)=4,20000,IF(AND(COUNTIF(Table1:],&quot;&gt;=100&quot;)=3,&gt;105),INDEX(Table2,MATCH(,Table2,0),MATCH(,Table2,0)),0))]20000YY20000170001450012000110
4XXA104112103109107,&quot;&gt;=100&quot;)=4,20000,IF(AND(COUNTIF(Table1:],&quot;&gt;=100&quot;)=3,&gt;105),INDEX(Table2,MATCH(,Table2,0),MATCH(,Table2,0)),0))]20000
5XXA10410510985101,&quot;&gt;=100&quot;)=4,20000,IF(AND(COUNTIF(Table1:],&quot;&gt;=100&quot;)=3,&gt;105),INDEX(Table2,MATCH(,Table2,0),MATCH(,Table2,0)),0))]0
6XXAA93133110110111,&quot;&gt;=100&quot;)=4,20000,IF(AND(COUNTIF(Table1:],&quot;&gt;=100&quot;)=3,&gt;105),INDEX(Table2,MATCH(,Table2,0),MATCH(,Table2,0)),0))]25000
7XXAA10012211294107,&quot;&gt;=100&quot;)=4,20000,IF(AND(COUNTIF(Table1:],&quot;&gt;=100&quot;)=3,&gt;105),INDEX(Table2,MATCH(,Table2,0),MATCH(,Table2,0)),0))]25000
8XXB68133114115107,&quot;&gt;=100&quot;)=4,20000,IF(AND(COUNTIF(Table1:],&quot;&gt;=100&quot;)=3,&gt;105),INDEX(Table2,MATCH(,Table2,0),MATCH(,Table2,0)),0))]16500
9XXB101114108105107,&quot;&gt;=100&quot;)=4,20000,IF(AND(COUNTIF(Table1:],&quot;&gt;=100&quot;)=3,&gt;105),INDEX(Table2,MATCH(,Table2,0),MATCH(,Table2,0)),0))]20000
10XXC103117118105111,&quot;&gt;=100&quot;)=4,20000,IF(AND(COUNTIF(Table1:],&quot;&gt;=100&quot;)=3,&gt;105),INDEX(Table2,MATCH(,Table2,0),MATCH(,Table2,0)),0))]20000
11XXC85119115112108,&quot;&gt;=100&quot;)=4,20000,IF(AND(COUNTIF(Table1:],&quot;&gt;=100&quot;)=3,&gt;105),INDEX(Table2,MATCH(,Table2,0),MATCH(,Table2,0)),0))]13000
12YYA85125112109108,&quot;&gt;=100&quot;)=4,20000,IF(AND(COUNTIF(Table1:],&quot;&gt;=100&quot;)=3,&gt;105),INDEX(Table2,MATCH(,Table2,0),MATCH(,Table2,0)),0))]17000
13YYA109102114110109,&quot;&gt;=100&quot;)=4,20000,IF(AND(COUNTIF(Table1:],&quot;&gt;=100&quot;)=3,&gt;105),INDEX(Table2,MATCH(,Table2,0),MATCH(,Table2,0)),0))]20000
14YYA105113104110108,&quot;&gt;=100&quot;)=4,20000,IF(AND(COUNTIF(Table1:],&quot;&gt;=100&quot;)=3,&gt;105),INDEX(Table2,MATCH(,Table2,0),MATCH(,Table2,0)),0))]20000
15YYA10011912786108,&quot;&gt;=100&quot;)=4,20000,IF(AND(COUNTIF(Table1:],&quot;&gt;=100&quot;)=3,&gt;105),INDEX(Table2,MATCH(,Table2,0),MATCH(,Table2,0)),0))]17000
16YYAA94134111111113,&quot;&gt;=100&quot;)=4,20000,IF(AND(COUNTIF(Table1:],&quot;&gt;=100&quot;)=3,&gt;105),INDEX(Table2,MATCH(,Table2,0),MATCH(,Table2,0)),0))]20000
17YYAA10112311395108,&quot;&gt;=100&quot;)=4,20000,IF(AND(COUNTIF(Table1:],&quot;&gt;=100&quot;)=3,&gt;105),INDEX(Table2,MATCH(,Table2,0),MATCH(,Table2,0)),0))]20000
18YYB69134115116109,&quot;&gt;=100&quot;)=4,20000,IF(AND(COUNTIF(Table1:],&quot;&gt;=100&quot;)=3,&gt;105),INDEX(Table2,MATCH(,Table2,0),MATCH(,Table2,0)),0))]14500
19YYB102115109106108,&quot;&gt;=100&quot;)=4,20000,IF(AND(COUNTIF(Table1:],&quot;&gt;=100&quot;)=3,&gt;105),INDEX(Table2,MATCH(,Table2,0),MATCH(,Table2,0)),0))]20000
20YYC104118119106112,&quot;&gt;=100&quot;)=4,20000,IF(AND(COUNTIF(Table1:],&quot;&gt;=100&quot;)=3,&gt;105),INDEX(Table2,MATCH(,Table2,0),MATCH(,Table2,0)),0))]20000
21YYC86120116113109,&quot;&gt;=100&quot;)=4,20000,IF(AND(COUNTIF(Table1:],&quot;&gt;=100&quot;)=3,&gt;105),INDEX(Table2,MATCH(,Table2,0),MATCH(,Table2,0)),0))]12000
Sheet2
 
Upvote 0
grid
col1AAABCANL
XX25000200001650013000105
data
col1col2QTR1QTR2QTR3QTR4ANLamount
XXA84124111108106

<tbody>
</tbody>

i want to first compare col1 of data with the grid of col1 then data col2 with transpose (AA,A,B,C) of grid and then check that all the qtr are >=100 of data , if 100 then the amount as per transpose slab(AA,A,B,C) and then any 3 qtr >= 100 of data and anl of data greater than anl of grid then the amount from transpose slab id (AA,A,B,C)

the formula i have tried but reflecting error at table1 as i given name range to table1 to data and table2 to grid
 
Upvote 0
Like this?
Excel Workbook
ABCDEFGHIJKLMNO
1col1col2QTR1QTR2QTR3QTR4ANLAmountcol1AAABCANL
2XXA84124111108106,&quot;&gt;100&quot;)=4,AND(COUNTIF(Table1:],&quot;&gt;100&quot;)=3,&gt;=INDEX(Table2,MATCH(,Table2,0)))),INDEX(Table2,MATCH(,Table2,0),MATCH(,Table2,0)),&quot;&quot;)]20000XX25000200001650013000105
3XXA108101113109108,&quot;&gt;100&quot;)=4,AND(COUNTIF(Table1:],&quot;&gt;100&quot;)=3,&gt;=INDEX(Table2,MATCH(,Table2,0)))),INDEX(Table2,MATCH(,Table2,0),MATCH(,Table2,0)),&quot;&quot;)]20000YY20000170001450012000110
4XXA104112103109107,&quot;&gt;100&quot;)=4,AND(COUNTIF(Table1:],&quot;&gt;100&quot;)=3,&gt;=INDEX(Table2,MATCH(,Table2,0)))),INDEX(Table2,MATCH(,Table2,0),MATCH(,Table2,0)),&quot;&quot;)]20000
5XXA10410510985101,&quot;&gt;100&quot;)=4,AND(COUNTIF(Table1:],&quot;&gt;100&quot;)=3,&gt;=INDEX(Table2,MATCH(,Table2,0)))),INDEX(Table2,MATCH(,Table2,0),MATCH(,Table2,0)),&quot;&quot;)]
6XXAA93133110110111,&quot;&gt;100&quot;)=4,AND(COUNTIF(Table1:],&quot;&gt;100&quot;)=3,&gt;=INDEX(Table2,MATCH(,Table2,0)))),INDEX(Table2,MATCH(,Table2,0),MATCH(,Table2,0)),&quot;&quot;)]25000
7XXAA10012211294107,&quot;&gt;100&quot;)=4,AND(COUNTIF(Table1:],&quot;&gt;100&quot;)=3,&gt;=INDEX(Table2,MATCH(,Table2,0)))),INDEX(Table2,MATCH(,Table2,0),MATCH(,Table2,0)),&quot;&quot;)]
8XXB68133114115107,&quot;&gt;100&quot;)=4,AND(COUNTIF(Table1:],&quot;&gt;100&quot;)=3,&gt;=INDEX(Table2,MATCH(,Table2,0)))),INDEX(Table2,MATCH(,Table2,0),MATCH(,Table2,0)),&quot;&quot;)]16500
9XXB101114108105107,&quot;&gt;100&quot;)=4,AND(COUNTIF(Table1:],&quot;&gt;100&quot;)=3,&gt;=INDEX(Table2,MATCH(,Table2,0)))),INDEX(Table2,MATCH(,Table2,0),MATCH(,Table2,0)),&quot;&quot;)]16500
10XXC103117118105111,&quot;&gt;100&quot;)=4,AND(COUNTIF(Table1:],&quot;&gt;100&quot;)=3,&gt;=INDEX(Table2,MATCH(,Table2,0)))),INDEX(Table2,MATCH(,Table2,0),MATCH(,Table2,0)),&quot;&quot;)]13000
11XXC85119115112108,&quot;&gt;100&quot;)=4,AND(COUNTIF(Table1:],&quot;&gt;100&quot;)=3,&gt;=INDEX(Table2,MATCH(,Table2,0)))),INDEX(Table2,MATCH(,Table2,0),MATCH(,Table2,0)),&quot;&quot;)]13000
12YYA85125112109108,&quot;&gt;100&quot;)=4,AND(COUNTIF(Table1:],&quot;&gt;100&quot;)=3,&gt;=INDEX(Table2,MATCH(,Table2,0)))),INDEX(Table2,MATCH(,Table2,0),MATCH(,Table2,0)),&quot;&quot;)]
13YYA109102114110109,&quot;&gt;100&quot;)=4,AND(COUNTIF(Table1:],&quot;&gt;100&quot;)=3,&gt;=INDEX(Table2,MATCH(,Table2,0)))),INDEX(Table2,MATCH(,Table2,0),MATCH(,Table2,0)),&quot;&quot;)]17000
14YYA105113104110108,&quot;&gt;100&quot;)=4,AND(COUNTIF(Table1:],&quot;&gt;100&quot;)=3,&gt;=INDEX(Table2,MATCH(,Table2,0)))),INDEX(Table2,MATCH(,Table2,0),MATCH(,Table2,0)),&quot;&quot;)]17000
15YYA10011912786108,&quot;&gt;100&quot;)=4,AND(COUNTIF(Table1:],&quot;&gt;100&quot;)=3,&gt;=INDEX(Table2,MATCH(,Table2,0)))),INDEX(Table2,MATCH(,Table2,0),MATCH(,Table2,0)),&quot;&quot;)]
16YYAA94134111111113,&quot;&gt;100&quot;)=4,AND(COUNTIF(Table1:],&quot;&gt;100&quot;)=3,&gt;=INDEX(Table2,MATCH(,Table2,0)))),INDEX(Table2,MATCH(,Table2,0),MATCH(,Table2,0)),&quot;&quot;)]20000
17YYAA10112311395108,&quot;&gt;100&quot;)=4,AND(COUNTIF(Table1:],&quot;&gt;100&quot;)=3,&gt;=INDEX(Table2,MATCH(,Table2,0)))),INDEX(Table2,MATCH(,Table2,0),MATCH(,Table2,0)),&quot;&quot;)]
18YYB69134115116109,&quot;&gt;100&quot;)=4,AND(COUNTIF(Table1:],&quot;&gt;100&quot;)=3,&gt;=INDEX(Table2,MATCH(,Table2,0)))),INDEX(Table2,MATCH(,Table2,0),MATCH(,Table2,0)),&quot;&quot;)]
19YYB102115109106108,&quot;&gt;100&quot;)=4,AND(COUNTIF(Table1:],&quot;&gt;100&quot;)=3,&gt;=INDEX(Table2,MATCH(,Table2,0)))),INDEX(Table2,MATCH(,Table2,0),MATCH(,Table2,0)),&quot;&quot;)]14500
20YYC104118119106112,&quot;&gt;100&quot;)=4,AND(COUNTIF(Table1:],&quot;&gt;100&quot;)=3,&gt;=INDEX(Table2,MATCH(,Table2,0)))),INDEX(Table2,MATCH(,Table2,0),MATCH(,Table2,0)),&quot;&quot;)]12000
21YYC86120116113109,&quot;&gt;100&quot;)=4,AND(COUNTIF(Table1:],&quot;&gt;100&quot;)=3,&gt;=INDEX(Table2,MATCH(,Table2,0)))),INDEX(Table2,MATCH(,Table2,0),MATCH(,Table2,0)),&quot;&quot;)]
Sheet2
 
Upvote 0
i am using excel 2010 & 2007 error message reflecting while entering the formula at -- Table1[@[QTR1]
 
Upvote 0
@njimack
Neil, not sure if you are aware that you can use the ‘Analyse range (Forum)’ field near the top left of the Excel jeanie screen to restrict the number of formulas generated. Click or click & drag if there is a single contiguous region of formulas you want to display. If non-contiguous cells, just type the cell addresses with commas between.

There is generally no need to display multiple formulas that are basically the same, it just fills up the board and makes your post and the thread hard to read/navigate.
 
Last edited:
Upvote 0
thanks a lot @njimack now working fine i was not inserting the table through insert command but giving the range name from the left corner both are different can you explained a little bit how its work
 
Upvote 0

Forum statistics

Threads
1,215,521
Messages
6,125,308
Members
449,218
Latest member
Excel Master

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