Weird formula issue

ghard1

Active Member
Joined
May 4, 2005
Messages
331
I have a worksheet with a formula which I have used successfuly in the past. However, when I add more data to my data file, the formula ceases to work. The formula I am using is:

=MAX(IF(Data!$H$2:$H$2000="male",Data!$AX$2:$AX$2000))

Where Column H contains either "Male" or "female" and is formatted as "general" and Column AX is a time and formatted as "custom: [mm]:ss

The formula will work if I sort the data by the H column with "male" below females, but not vice versa.

By using the formula:
=average(data!ax2:ax2000)

I do get an answer.

Any ideas why this formula won't work?

Thanks in advance for all your help!
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.

Scott Huish

MrExcel MVP
Joined
Mar 17, 2004
Messages
19,958
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
What does "won't work" mean exactly? Do you get an error? Do you get an answer different from what you expected? If so, what answer did you expect, what answer did you get?
 

barry houdini

MrExcel MVP
Joined
Mar 23, 2005
Messages
20,825
Have you confirmed the formula with CTRL+SHIFT+ENTER so that curly braces appear around it in the formula bar?
 

ghard1

Active Member
Joined
May 4, 2005
Messages
331
I get 00:00 and I should get 185:00

which is what I get as long as I sort the data by column H and decending
 

ghard1

Active Member
Joined
May 4, 2005
Messages
331
I did not enter it as an array. Must I? I forgot to mention that the formula is in a merged cell. When I try to enter it in an array excel says I cannot enter an array in a merged cell.

Also, why would the formula work correctly when my data worksheet contained 60 entries (I now have 1300)?

Thanks
 

ghard1

Active Member
Joined
May 4, 2005
Messages
331
I just noticed that I had previously entered the formula as an array when it worked. I also figured out how to fix it. If I unmerge the cells, enter the formula as an array and then re-merge the cells it works! Thanks for the heads up Barry!
 

Forum statistics

Threads
1,136,349
Messages
5,675,244
Members
419,557
Latest member
razlevav

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
Top