MAX function ignore blanks?

hawley

Board Regular
Joined
Apr 7, 2002
Messages
197
I have a named range where I try to find the MAX. Since there are blanks I am getting #N/A error. If I fill in the blanks I get a number. Is there a way for the MAX to ignore blanks? My first thought is to create an if statement or loop that fills in the 0's but was hoping to do it with the formula.

={MAX((Dpt=AX397)*Bst))}
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Maybe...

=MAX(IF(Dpt=AX397,IF(Dpt<>"",Bst)))

Enter with Ctrl + Shift + Enter

With this it does not care about blanks from my test...

=MAX(IF(Dpt=AX397,Bst))

Also a CSE

Try them both on your data and see if there is a difference...
 
Upvote 0
Per Excel help max function should ignore blanks. See below from help.
<TABLE style="WIDTH: 720pt; BORDER-COLLAPSE: collapse" border=0 cellSpacing=0 cellPadding=0 width=960><COLGROUP><COL style="WIDTH: 720pt; mso-width-source: userset; mso-width-alt: 35108" width=960><TBODY><TR style="HEIGHT: 15.75pt" height=21><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: transparent; WIDTH: 720pt; HEIGHT: 15.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0" id=td_post_2905308 class=xl65 height=21 width=960>If an argument is an array or reference, only numbers in that array or reference are used. Empty cells, logical values, or text in the array or reference are ignored</TD></TR></TBODY></TABLE>

However this should work if Bst is a single cell.
<TABLE style="WIDTH: 230pt; BORDER-COLLAPSE: collapse" border=0 cellSpacing=0 cellPadding=0 width=307><COLGROUP><COL style="WIDTH: 230pt; mso-width-source: userset; mso-width-alt: 11227" width=307><TBODY><TR style="HEIGHT: 15pt" height=20><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: transparent; WIDTH: 230pt; HEIGHT: 15pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0" id=td_post_2905308 height=20 width=307>=MAX(IFERROR(DXP,""))*bst</TD></TR></TBODY></TABLE>

If Bst is a range of values you should be able to use something like this:
<TABLE style="WIDTH: 230pt; BORDER-COLLAPSE: collapse" border=0 cellSpacing=0 cellPadding=0 width=307><COLGROUP><COL style="WIDTH: 230pt; mso-width-source: userset; mso-width-alt: 11227" width=307><TBODY><TR style="HEIGHT: 15.75pt" height=21><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: transparent; WIDTH: 230pt; HEIGHT: 15.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0" height=21 width=307></TD></TR></TBODY></TABLE>
=MAX(IFERROR(DXP,""))*MAX(IFERROR(Bst,""))
Both of these are array formulas and must be entered with
CTRL-SHIFT-ENT
 
Upvote 0

Forum statistics

Threads
1,224,395
Messages
6,178,355
Members
452,841
Latest member
GenAkaman

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