MaxIf Function

Chakeyla

New Member
I would like to write a formula that looks at the last month with a percent value greater than zero, then return the percent value in a specific cell. In the example below I want to display 85.0% in the cell. It should update each time data is entered for the following month.

Here is the source:

Month Percentage
October 96.0%
November 2.0%
December 70.0%
January 85.0%
February 0.0%
March 0.0%
April 0.0%
May 0.0%
June 0.0%
July 0.0%
August 0.0%
September 0.0%

Thanks!

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.

c_m_s_jr

Well-known Member
Maybe something like:

=INDEX(\$A\$1:\$A\$34,MATCH(0,A1:J34,0)-1,0)

taigovinda

Well-known Member
Hi Chakeyla,

Try this:
Excel Workbook
ABCD
1Month Percentage
2October96.00%0.85
3November2.00%
4December70.00%
5January85.00%
6February0.00%
7March0.00%
8April0.00%
9May0.00%
10June0.00%
11July0.00%
12August0.00%
13September0.00%
Sheet1
Excel 2003
#VALUE!
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.

Nogslaw

Well-known Member
Not thoroughly tested, but I think this will work:

=RIGHT(OFFSET(A4,MATCH("*" & " 0.0%",A4:A16,0)-2,0), 5)

By the way, I assumed that your Months and values were in the same cell. If they are in different cells, then it is much easier.

c_m_s_jr

Well-known Member

Hi Chakeyla,

Try this:
Excel Workbook
ABCD
1Month Percentage
2October96.00%0.85
3November2.00%
4December70.00%
5January85.00%
6February0.00%
7March0.00%
8April0.00%
9May0.00%
10June0.00%
11July0.00%
12August0.00%
13September0.00%
Sheet1
Excel 2003
#VALUE!
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}. Note: Do not try and enter these manually yourself

Must have missed it by just second Tai

Chakeyla

New Member
Thanks for the response, however I received #N/A as the result. Do you have any suggestions?

c_m_s_jr

Well-known Member

On which formula there are 3 different ones...

Chakeyla

New Member
Thank you! I used the second suggestion and it worked perfectly!

taigovinda

Well-known Member
Must have missed it by just second Tai

But mine didn't have a typo ...although sans typo, your formula is clearly better!

c_m_s_jr

Well-known Member
I see the type now! Darn "J".

Better or not yours was a clever approach because it does not rely on the fact that 0 must always be populated.

Replies
4
Views
103
Replies
2
Views
403
Replies
5
Views
160
Replies
5
Views
327
Replies
1
Views
206

1,141,715
Messages
5,708,038
Members
421,540
Latest member
quocbinh

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.

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

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