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

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
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?
 
Upvote 0
Have you confirmed the formula with CTRL+SHIFT+ENTER so that curly braces appear around it in the formula bar?
 
Upvote 0
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
 
Upvote 0
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
 
Upvote 0
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!
 
Upvote 0

Forum statistics

Threads
1,217,383
Messages
6,136,264
Members
450,001
Latest member
KWeekley08

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