3 consecutive months reporting volumes in a row

ginger123

New Member
Joined
Jan 25, 2018
Messages
4
I want to know how to write a formula for last productiondate; if the well has produced for 3 consecutive months it would put the datein the box for me….
I have 10 years worth of data and it will need to pick the most recent - 3 consecutive month production date...if that makes sense!?!?
Any help would be much appreciated!!!


Example:
[TABLE="width: 743"]
<tbody>[TR]
[TD="class: xl68, width: 67"]Well ID
[/TD]
[TD="class: xl66, width: 64"]Jan-17
[/TD]
[TD="class: xl66, width: 64"]Feb-17
[/TD]
[TD="class: xl66, width: 65"]Mar-17
[/TD]
[TD="class: xl66, width: 64"]Apr-17
[/TD]
[TD="class: xl66, width: 67"]May-17
[/TD]
[TD="class: xl66, width: 64"]Jun-17
[/TD]
[TD="class: xl66, width: 64"]Jul-17
[/TD]
[TD="class: xl66, width: 65"]Aug-17
[/TD]
[TD="class: xl66, width: 64"]Sep-17
[/TD]
[TD="class: xl66, width: 64"]Oct-17
[/TD]
[TD="class: xl66, width: 66"]Nov-17
[/TD]
[TD="class: xl66, width: 64"]Dec-17
[/TD]
[TD="class: xl66, width: 148"]Last production date
[/TD]
[/TR]
[TR]
[TD="class: xl69"]Well A
[/TD]
[TD="class: xl65"]15
[/TD]
[TD="class: xl65"]20
[/TD]
[TD="class: xl65"]15
[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"]10
[/TD]
[TD="class: xl65"]10
[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"]15
[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"]25
[/TD]
[TD="class: xl67"]Mar-17
[/TD]
[/TR]
[TR]
[TD="class: xl69, bgcolor: transparent"]Well B
[/TD]
[TD="class: xl65, bgcolor: transparent"]4
[/TD]
[TD="class: xl65, bgcolor: transparent"]2
[/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"]5
[/TD]
[TD="class: xl65, bgcolor: transparent"]7
[/TD]
[TD="class: xl65, bgcolor: transparent"]8
[/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"]15
[/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"]5
[/TD]
[TD="class: xl67, bgcolor: transparent"]Jul-17
[/TD]
[/TR]
[TR]
[TD="class: xl69"]Well C
[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"]10
[/TD]
[TD="class: xl65"]10
[/TD]
[TD="class: xl65"]10
[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl67"]Jun-17
[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Try

=LOOKUP(2,1/($B2:$K2<>"")/($C2:$L2<>"")/($D2:$M2<>""),$D$1:$M$1)

Thanks for your reply!
So I tried it and it just comes up with Dec 17 on all 3 rows. I would like it to return the most recent consecutive 3 month production...
[TABLE="width: 791"]
<colgroup><col width="67" style="width: 50pt; mso-width-source: userset; mso-width-alt: 2450;"> <col width="64" style="width: 48pt;" span="2"> <col width="65" style="width: 49pt; mso-width-source: userset; mso-width-alt: 2377;"> <col width="64" style="width: 48pt;"> <col width="67" style="width: 50pt; mso-width-source: userset; mso-width-alt: 2450;"> <col width="64" style="width: 48pt;" span="2"> <col width="65" style="width: 49pt; mso-width-source: userset; mso-width-alt: 2377;"> <col width="64" style="width: 48pt;" span="2"> <col width="66" style="width: 50pt; mso-width-source: userset; mso-width-alt: 2413;"> <col width="64" style="width: 48pt;"> <col width="148" style="width: 111pt; mso-width-source: userset; mso-width-alt: 5412;"> <col width="64" style="width: 48pt;"> <tbody>[TR]
[TD="class: xl69, width: 67, bgcolor: #4472C4"]Well ID[/TD]
[TD="class: xl70, width: 64, bgcolor: #4472C4"]Jan-17[/TD]
[TD="class: xl70, width: 64, bgcolor: #4472C4"]Feb-17[/TD]
[TD="class: xl70, width: 65, bgcolor: #4472C4"]Mar-17[/TD]
[TD="class: xl70, width: 64, bgcolor: #4472C4"]Apr-17[/TD]
[TD="class: xl70, width: 67, bgcolor: #4472C4"]May-17[/TD]
[TD="class: xl70, width: 64, bgcolor: #4472C4"]Jun-17[/TD]
[TD="class: xl70, width: 64, bgcolor: #4472C4"]Jul-17[/TD]
[TD="class: xl70, width: 65, bgcolor: #4472C4"]Aug-17[/TD]
[TD="class: xl70, width: 64, bgcolor: #4472C4"]Sep-17[/TD]
[TD="class: xl70, width: 64, bgcolor: #4472C4"]Oct-17[/TD]
[TD="class: xl70, width: 66, bgcolor: #4472C4"]Nov-17[/TD]
[TD="class: xl70, width: 64, bgcolor: #4472C4"]Dec-17[/TD]
[TD="class: xl71, width: 148, bgcolor: #4472C4"]Last production date[/TD]
[TD="width: 64, bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="class: xl72, bgcolor: #D9E1F2"]Well A[/TD]
[TD="class: xl79, bgcolor: yellow"]15[/TD]
[TD="class: xl79, bgcolor: yellow"]20[/TD]
[TD="class: xl82, bgcolor: yellow"]15[/TD]
[TD="class: xl73, bgcolor: #D9E1F2"]0[/TD]
[TD="class: xl73, bgcolor: #D9E1F2"]0[/TD]
[TD="class: xl73, bgcolor: #D9E1F2"]10[/TD]
[TD="class: xl73, bgcolor: #D9E1F2"]10[/TD]
[TD="class: xl73, bgcolor: #D9E1F2"]0[/TD]
[TD="class: xl73, bgcolor: #D9E1F2"]15[/TD]
[TD="class: xl73, bgcolor: #D9E1F2"]0[/TD]
[TD="class: xl73, bgcolor: #D9E1F2"]0[/TD]
[TD="class: xl73, bgcolor: #D9E1F2"]25[/TD]
[TD="class: xl74, bgcolor: #D9E1F2"]Mar-17[/TD]
[TD="class: xl78, bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="class: xl75, bgcolor: transparent"]Well B[/TD]
[TD="class: xl76, bgcolor: transparent"]4[/TD]
[TD="class: xl76, bgcolor: transparent"]2[/TD]
[TD="class: xl65, bgcolor: transparent"]0[/TD]
[TD="class: xl76, bgcolor: transparent"]0[/TD]
[TD="class: xl80, bgcolor: yellow"]5[/TD]
[TD="class: xl80, bgcolor: yellow"]7[/TD]
[TD="class: xl84, bgcolor: yellow"]8[/TD]
[TD="class: xl76, bgcolor: transparent"]0[/TD]
[TD="class: xl76, bgcolor: transparent"]0[/TD]
[TD="class: xl76, bgcolor: transparent"]15[/TD]
[TD="class: xl76, bgcolor: transparent"]0[/TD]
[TD="class: xl76, bgcolor: transparent"]5[/TD]
[TD="class: xl77, bgcolor: transparent"]Jul-17[/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="class: xl68, bgcolor: #D9E1F2"]Well C[/TD]
[TD="class: xl67, bgcolor: #D9E1F2"]10[/TD]
[TD="class: xl67, bgcolor: #D9E1F2"]10[/TD]
[TD="class: xl67, bgcolor: #D9E1F2"]10[/TD]
[TD="class: xl67, bgcolor: #D9E1F2"]0[/TD]
[TD="class: xl67, bgcolor: #D9E1F2"]0[/TD]
[TD="class: xl81, bgcolor: yellow"]10[/TD]
[TD="class: xl83, bgcolor: yellow"]10[/TD]
[TD="class: xl82, bgcolor: yellow"]10[/TD]
[TD="class: xl67, bgcolor: #D9E1F2"]0[/TD]
[TD="class: xl67, bgcolor: #D9E1F2"]0[/TD]
[TD="class: xl67, bgcolor: #D9E1F2"]0[/TD]
[TD="class: xl67, bgcolor: #D9E1F2"]0[/TD]
[TD="class: xl66, bgcolor: #D9E1F2"]Aug-17[/TD]
[TD="class: xl78, bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
That's because now you have zeros in your dataset, whereas in Post # 1 you had blank cells instead.

The following formula has been tested to return the expected results for the dataset from Post # 4:

=LOOKUP(2,1/($B2:$K2>0)/($C2:$L2>0)/($D2:$M2>0),$D$1:$M$1)
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,324
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