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

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.
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,214,651
Messages
6,120,744
Members
448,989
Latest member
mariah3

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