large minus counta

bluepenink

Well-known Member
Joined
Dec 21, 2010
Messages
585
Hello

having some trouble with the large function.

basically i have a selection from a drop down list which shows a list of cities in a state. some state have 8 cities, while some have 5 etc.

my large formula is:
=(LARGE($D$64:$D$73,F64)
where range D = city
where range f = number 1-8

now, when i change a state that has 5 cities, i get a #N/A error so i tried to incorporate a counta to offset any blank space, but still getting N/A error

can someone help with my logistic here, thxs so much

=IF(D64="","",(LARGE($D$64:$D$73,F64)-COUNTA($D$64:$D$73)))

basically, im saying, if D64 is blank then do nothing or N/A, otherwise use tthe large function.....

what am i doing wrong?

cheers
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
LARGE requires a numeric refernce. You say that the D range houses cities. If so, this invalidates the LARGE formula. Don't you get a #VALUE! error.
 
Upvote 0
Does D64:D73 contain the NAMES of the cities ?
If yes, the LARGE function won't work properly on them.
__________________
LARGE requires a numeric refernce. You say that the D range houses cities. If so, this invalidates the LARGE formula. Don't you get a #VALUE! error.
 
Upvote 0
Hello

having some trouble with the large function.

basically i have a selection from a drop down list which shows a list of cities in a state. some state have 8 cities, while some have 5 etc.

my large formula is:
=(LARGE($D$64:$D$73,F64)
where range D = city
where range f = number 1-8

now, when i change a state that has 5 cities, i get a #N/A error so i tried to incorporate a counta to offset any blank space, but still getting N/A error

can someone help with my logistic here, thxs so much

=IF(D64="","",(LARGE($D$64:$D$73,F64)-COUNTA($D$64:$D$73)))

basically, im saying, if D64 is blank then do nothing or N/A, otherwise use tthe large function.....

what am i doing wrong?

cheers
It's not real clear what you're trying to do.

What is the purpose of this formula? Is it supposed to determine how many items are displayed in your drop down list?
 
Upvote 0
Are you trying to count the largest number of cities mentioned? ie say the city thats mentioned the most, then second most and third most etc etc
 
Upvote 0
hello guys

sorry i was unable to respond right away (meeting)

the purpose of the large function is to show obv. values from top to bottom of the cities generating revenue.

im graphing those values so it was giving me problems when i selected a state that had less cities than a full 8 city state.

and yes, range D is the range where the city name is stored.

much appreciated.
 
Upvote 0
Are you trying to count the largest number of cities mentioned? ie say the city thats mentioned the most, then second most and third most etc etc

yes, that is what my goal is, but when the city count is i.e. 5, then the formula shows the error. :S
 
Upvote 0
hello guys

sorry i was unable to respond right away (meeting)

the purpose of the large function is to show obv. values from top to bottom of the cities generating revenue.

im graphing those values so it was giving me problems when i selected a state that had less cities than a full 8 city state.

and yes, range D is the range where the city name is stored.

much appreciated.

A1: Tokyo
A2: London
A3: Paris

=LARGE(A1:A3,2) ===> #VALUE!

Since you have city names in the D range, the bit with

LARGE($D$64:$D$73,F64)

will equally fail.
 
Upvote 0
If =LARGE($D$64:$D$73,F64) works when there are more than (or=) F64 cities, how about

=IF(COUNT($D$64:$D$73)>F64,"not enough data", LARGE($D$64:$D$73,F64))
 
Upvote 0

Forum statistics

Threads
1,224,597
Messages
6,179,812
Members
452,945
Latest member
Bib195

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