Show target missed for last how many months

Firasath

Board Regular
Joined
Feb 20, 2011
Messages
134
Office Version
  1. 365
Hi,

I have a KPI dashboard where I have data from 2016 onwards. Each KPI data is organized in each row. KPI name is placed in A column and it's target in B column followed by monthly achievements.

I would like to know for how many consecutive previous months the target is not achieved for each KPI. Suppose I have a data up to Apr-19 and for one of the KPI the target was not achieved from Nov-18 onwards, then the value should return as 6 and for another KPI target is achieved in Apr-19 then the result should be 0.

Is there any formula or VBA Code I can use to achieve this. Kindly advise.
 
i am sorry i dont know how to paste the entire formula here. Only half is coming here.

<b2,5,if(h2<b2,6,if(g2<b2,7,if(f2<b2,8,if(e2<b2,9,if(d2<b2,10,if(c2<b2,11,12))))))))))))[ php]
PHP:
=IF(N2>=B2,0,IF(M2<=B2,1,IF(L2<=B2,2,IF(K2<=B2,3,IF(J2<=B2,4,IF(I2<B2,5,IF(H2<B2,6,IF(G2<B2,7,IF(F2<B2,8,IF(E2<B2,9,IF(D2<B2,10,IF(C2<B2,11,12))))))))))))

Try this

Regards,
Sai
</b2,5,if(h2<b2,6,if(g2<b2,7,if(f2<b2,8,if(e2<b2,9,if(d2<b2,10,if(c2<b2,11,12))))))))))))[>
 
Last edited:
Upvote 0

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.
Hi Sai

You can paste your formula into a reply with the # button
 
Upvote 0
Dear Sai,

I don't think above formula is a feasible solution for my requirement as every month we need to modify the formula by adding one more month's cell reference in to it. I think the solution should be there in VBA.

Request anybody who can support in developing cede for the same.
 
Upvote 0

Forum statistics

Threads
1,214,657
Messages
6,120,764
Members
448,991
Latest member
Hanakoro

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