Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 267
Default small function

=SMALL(--LEFT(I18:I30,3),1)

how do I get this function to ignore empty cells in the range I18:I30 and to
still work when some of the numbers are less than 3 numbers in length (there
is text as well in some cells thats why I have limited it to 3 numbers.)
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default small function

ATishoo,

I would use a column of helper formulas: extract the leading numbers using this array formula in J18

=LEFT(I18,MIN(IF(CODE(MID(I18,ROW(INDIRECT("A1:A"& LEN(I18))),1))57,ROW(INDIRECT("A1:A"&LEN(I18)))))-1)*1

copied to J30, then use this array formula to get the minimum:

=MIN(IF(ISERROR(J18:J30),"",J18:J30))

HTH,
Bernie
MS Excel MVP


"Atishoo" wrote in message
...
=SMALL(--LEFT(I18:I30,3),1)

how do I get this function to ignore empty cells in the range I18:I30 and to
still work when some of the numbers are less than 3 numbers in length (there
is text as well in some cells thats why I have limited it to 3 numbers.)



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default small function

This array-entered** formula should get you the smallest value in your
range...

=SMALL(IF(ISNUMBER(--LEFT(I18:I30,3)),--LEFT(I18:I30,3),""),1)

**commit this formula using Ctrl+Shift+Enter, not just Enter by itself

Rick


"Atishoo" wrote in message
...
=SMALL(--LEFT(I18:I30,3),1)

how do I get this function to ignore empty cells in the range I18:I30 and
to
still work when some of the numbers are less than 3 numbers in length
(there
is text as well in some cells thats why I have limited it to 3 numbers.)


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default small function

Rick,

That won't find numbers that are less than 3 numbers in length:

But using this will: it isn't flexible (in terms of maximum digits possible) but only the OP can
tell if it works. Array entered as well

=SMALL(IF(ISNUMBER(--LEFT(I18:I30,4)),--LEFT(I18:I30,4),IF(ISNUMBER(--LEFT(I18:I30,3)),--LEFT(I18:I30,3),IF(ISNUMBER(--LEFT(I18:I30,2)),--LEFT(I18:I30,2),IF(ISNUMBER(--LEFT(I18:I30,1)),--LEFT(I18:I30,1),"")))),1)

HTH,
Bernie
MS Excel MVP


"Rick Rothstein (MVP - VB)" wrote in message
...
This array-entered** formula should get you the smallest value in your range...

=SMALL(IF(ISNUMBER(--LEFT(I18:I30,3)),--LEFT(I18:I30,3),""),1)

**commit this formula using Ctrl+Shift+Enter, not just Enter by itself

Rick


"Atishoo" wrote in message
...
=SMALL(--LEFT(I18:I30,3),1)

how do I get this function to ignore empty cells in the range I18:I30 and to
still work when some of the numbers are less than 3 numbers in length (there
is text as well in some cells thats why I have limited it to 3 numbers.)




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default small function

One of these days I am going to have to learn how to read.<g Yep! His post
sure does say there can be less than 3 leading digits. You formula is how I
would have done it had I read the post fully... except I think to match the
OP's request, shouldn't you start with LEFT(I18:I30,3), not LEFT(I18:I30,4)?

Rick


"Bernie Deitrick" <deitbe @ consumer dot org wrote in message
...
Rick,

That won't find numbers that are less than 3 numbers in length:

But using this will: it isn't flexible (in terms of maximum digits
possible) but only the OP can tell if it works. Array entered as well

=SMALL(IF(ISNUMBER(--LEFT(I18:I30,4)),--LEFT(I18:I30,4),IF(ISNUMBER(--LEFT(I18:I30,3)),--LEFT(I18:I30,3),IF(ISNUMBER(--LEFT(I18:I30,2)),--LEFT(I18:I30,2),IF(ISNUMBER(--LEFT(I18:I30,1)),--LEFT(I18:I30,1),"")))),1)

HTH,
Bernie
MS Excel MVP


"Rick Rothstein (MVP - VB)" wrote in
message ...
This array-entered** formula should get you the smallest value in your
range...

=SMALL(IF(ISNUMBER(--LEFT(I18:I30,3)),--LEFT(I18:I30,3),""),1)

**commit this formula using Ctrl+Shift+Enter, not just Enter by itself

Rick


"Atishoo" wrote in message
...
=SMALL(--LEFT(I18:I30,3),1)

how do I get this function to ignore empty cells in the range I18:I30
and to
still work when some of the numbers are less than 3 numbers in length
(there
is text as well in some cells thats why I have limited it to 3 numbers.)







  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default small function

Rick,

I was just expanding it to show the pattern, since the OP seemed to imply that some were longer than
3 digits, talking about limiting it... Anyway, there is no harm in checking the first four to see
if they are numeric - if there is a letter within those 4, it goes to the first 3, then 2, then 1,
then ignores it altogether.

HTH,
Bernie
MS Excel MVP


"Rick Rothstein (MVP - VB)" wrote in message
...
One of these days I am going to have to learn how to read.<g Yep! His post sure does say there
can be less than 3 leading digits. You formula is how I would have done it had I read the post
fully... except I think to match the OP's request, shouldn't you start with LEFT(I18:I30,3), not
LEFT(I18:I30,4)?

Rick


"Bernie Deitrick" <deitbe @ consumer dot org wrote in message
...
Rick,

That won't find numbers that are less than 3 numbers in length:

But using this will: it isn't flexible (in terms of maximum digits possible) but only the OP can
tell if it works. Array entered as well

=SMALL(IF(ISNUMBER(--LEFT(I18:I30,4)),--LEFT(I18:I30,4),IF(ISNUMBER(--LEFT(I18:I30,3)),--LEFT(I18:I30,3),IF(ISNUMBER(--LEFT(I18:I30,2)),--LEFT(I18:I30,2),IF(ISNUMBER(--LEFT(I18:I30,1)),--LEFT(I18:I30,1),"")))),1)

HTH,
Bernie
MS Excel MVP


"Rick Rothstein (MVP - VB)" wrote in message
...
This array-entered** formula should get you the smallest value in your range...

=SMALL(IF(ISNUMBER(--LEFT(I18:I30,3)),--LEFT(I18:I30,3),""),1)

**commit this formula using Ctrl+Shift+Enter, not just Enter by itself

Rick


"Atishoo" wrote in message
...
=SMALL(--LEFT(I18:I30,3),1)

how do I get this function to ignore empty cells in the range I18:I30 and to
still work when some of the numbers are less than 3 numbers in length (there
is text as well in some cells thats why I have limited it to 3 numbers.)






  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default small function

I was just wondering about the extra function call and, although the OP's
post probably rules this out, the possibility of an incorrect result if all
cell entries had 4 or more leading digits (I would assume the OP only wants
to look at a maximum of the first 3 digits no matter matter what follows
them... letters or numbers).

Rick


"Bernie Deitrick" <deitbe @ consumer dot org wrote in message
...
Rick,

I was just expanding it to show the pattern, since the OP seemed to imply
that some were longer than 3 digits, talking about limiting it... Anyway,
there is no harm in checking the first four to see if they are numeric -
if there is a letter within those 4, it goes to the first 3, then 2, then
1, then ignores it altogether.

HTH,
Bernie
MS Excel MVP


"Rick Rothstein (MVP - VB)" wrote in
message ...
One of these days I am going to have to learn how to read.<g Yep! His
post sure does say there can be less than 3 leading digits. You formula
is how I would have done it had I read the post fully... except I think
to match the OP's request, shouldn't you start with LEFT(I18:I30,3), not
LEFT(I18:I30,4)?

Rick


"Bernie Deitrick" <deitbe @ consumer dot org wrote in message
...
Rick,

That won't find numbers that are less than 3 numbers in length:

But using this will: it isn't flexible (in terms of maximum digits
possible) but only the OP can tell if it works. Array entered as well

=SMALL(IF(ISNUMBER(--LEFT(I18:I30,4)),--LEFT(I18:I30,4),IF(ISNUMBER(--LEFT(I18:I30,3)),--LEFT(I18:I30,3),IF(ISNUMBER(--LEFT(I18:I30,2)),--LEFT(I18:I30,2),IF(ISNUMBER(--LEFT(I18:I30,1)),--LEFT(I18:I30,1),"")))),1)

HTH,
Bernie
MS Excel MVP


"Rick Rothstein (MVP - VB)" wrote
in message ...
This array-entered** formula should get you the smallest value in your
range...

=SMALL(IF(ISNUMBER(--LEFT(I18:I30,3)),--LEFT(I18:I30,3),""),1)

**commit this formula using Ctrl+Shift+Enter, not just Enter by itself

Rick


"Atishoo" wrote in message
...
=SMALL(--LEFT(I18:I30,3),1)

how do I get this function to ignore empty cells in the range I18:I30
and to
still work when some of the numbers are less than 3 numbers in length
(there
is text as well in some cells thats why I have limited it to 3
numbers.)







  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 267
Default small function

brilliant Rick thanks!!
is there an easy way to add to that to return the entire contents of the
cell containing the smallest number?

"Rick Rothstein (MVP - VB)" wrote:

This array-entered** formula should get you the smallest value in your
range...

=SMALL(IF(ISNUMBER(--LEFT(I18:I30,3)),--LEFT(I18:I30,3),""),1)

**commit this formula using Ctrl+Shift+Enter, not just Enter by itself

Rick


"Atishoo" wrote in message
...
=SMALL(--LEFT(I18:I30,3),1)

how do I get this function to ignore empty cells in the range I18:I30 and
to
still work when some of the numbers are less than 3 numbers in length
(there
is text as well in some cells thats why I have limited it to 3 numbers.)



  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default small function

Well, as Bernie pointed out, the formula I posted only works if there are 3
or more digits in the beginning of your cell entries; however, you said (and
I overlooked this when I first read your post) that "some of the numbers are
less than 3 numbers in length". So I am thinking, based on this, that my
formula will not handle all the cases you said it would have to. Which is
correct... you only have 3 or more lead digits or you can have less than 3
lead digits?

Rick


"Atishoo" wrote in message
...
brilliant Rick thanks!!
is there an easy way to add to that to return the entire contents of the
cell containing the smallest number?

"Rick Rothstein (MVP - VB)" wrote:

This array-entered** formula should get you the smallest value in your
range...

=SMALL(IF(ISNUMBER(--LEFT(I18:I30,3)),--LEFT(I18:I30,3),""),1)

**commit this formula using Ctrl+Shift+Enter, not just Enter by itself

Rick


"Atishoo" wrote in message
...
=SMALL(--LEFT(I18:I30,3),1)

how do I get this function to ignore empty cells in the range I18:I30
and
to
still work when some of the numbers are less than 3 numbers in length
(there
is text as well in some cells thats why I have limited it to 3
numbers.)




  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 267
Default small function

wow fascinating conversation about this blinkin small function but I owe you
and bernie an appology as i have not explained myself well at all! again!

what I have is a page that contains days of the week across the top and
client names down the side! I then enter staff names and times and actions
into the grid!

I have a set of seperate sheets for each staff member again with days of the
week across the top! I want to display the client name and the time they are
visting in time order (a diary) for each staff member.

I have filtered out each individuals client vists using if function in a
nother grid on an unused area of the staff diary sheet:

=IF(ISERROR(SEARCH(staff1,'Main Board'!G7)),"",'Main Board'!F7&" "&'Main
Board'!E7&" "&'Main Board'!F8)

this then returns a set of single strings beginning with a time eg
9.30, christopher B, Budgeting. or completely empty cells if there is
nothing enetered or cells without a time if they havent got a fixed time.

so the time could be 3 or 4 digits witha decimal point.

i was thinking of using the small function to return the contents of the
cell with the earliest time then the second earliest time etc but hit
problems with empty cells, cells with no time and with returning the entire
contents of the cell not just the lowest number!

(Ill catch my breath after that long winded explination) ill tell you what
though its gonna be a kick ass system when finished I have got it up on a
touch sensative smart board and its fantastic to play with!

"Rick Rothstein (MVP - VB)" wrote:

Well, as Bernie pointed out, the formula I posted only works if there are 3
or more digits in the beginning of your cell entries; however, you said (and
I overlooked this when I first read your post) that "some of the numbers are
less than 3 numbers in length". So I am thinking, based on this, that my
formula will not handle all the cases you said it would have to. Which is
correct... you only have 3 or more lead digits or you can have less than 3
lead digits?

Rick


"Atishoo" wrote in message
...
brilliant Rick thanks!!
is there an easy way to add to that to return the entire contents of the
cell containing the smallest number?

"Rick Rothstein (MVP - VB)" wrote:

This array-entered** formula should get you the smallest value in your
range...

=SMALL(IF(ISNUMBER(--LEFT(I18:I30,3)),--LEFT(I18:I30,3),""),1)

**commit this formula using Ctrl+Shift+Enter, not just Enter by itself

Rick


"Atishoo" wrote in message
...
=SMALL(--LEFT(I18:I30,3),1)

how do I get this function to ignore empty cells in the range I18:I30
and
to
still work when some of the numbers are less than 3 numbers in length
(there
is text as well in some cells thats why I have limited it to 3
numbers.)






  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default small function

Do you need further help with the function? Clearly, you may need 5 digits, for a time like
10.30....

=SMALL(IF(ISNUMBER(--LEFT(I18:I30,5)),--LEFT(I18:I30,5),IF(ISNUMBER(--LEFT(I18:I30,4)),--LEFT(I18:I30,4),IF(ISNUMBER(--LEFT(I18:I30,3)),--LEFT(I18:I30,3),IF(ISNUMBER(--LEFT(I18:I30,2)),--LEFT(I18:I30,2),IF(ISNUMBER(--LEFT(I18:I30,1)),--LEFT(I18:I30,1),""))))),1)


HTH,
Bernie
MS Excel MVP


"Atishoo" wrote in message
...
wow fascinating conversation about this blinkin small function but I owe you
and bernie an appology as i have not explained myself well at all! again!

what I have is a page that contains days of the week across the top and
client names down the side! I then enter staff names and times and actions
into the grid!

I have a set of seperate sheets for each staff member again with days of the
week across the top! I want to display the client name and the time they are
visting in time order (a diary) for each staff member.

I have filtered out each individuals client vists using if function in a
nother grid on an unused area of the staff diary sheet:

=IF(ISERROR(SEARCH(staff1,'Main Board'!G7)),"",'Main Board'!F7&" "&'Main
Board'!E7&" "&'Main Board'!F8)

this then returns a set of single strings beginning with a time eg
9.30, christopher B, Budgeting. or completely empty cells if there is
nothing enetered or cells without a time if they havent got a fixed time.

so the time could be 3 or 4 digits witha decimal point.

i was thinking of using the small function to return the contents of the
cell with the earliest time then the second earliest time etc but hit
problems with empty cells, cells with no time and with returning the entire
contents of the cell not just the lowest number!

(Ill catch my breath after that long winded explination) ill tell you what
though its gonna be a kick ass system when finished I have got it up on a
touch sensative smart board and its fantastic to play with!

"Rick Rothstein (MVP - VB)" wrote:

Well, as Bernie pointed out, the formula I posted only works if there are 3
or more digits in the beginning of your cell entries; however, you said (and
I overlooked this when I first read your post) that "some of the numbers are
less than 3 numbers in length". So I am thinking, based on this, that my
formula will not handle all the cases you said it would have to. Which is
correct... you only have 3 or more lead digits or you can have less than 3
lead digits?

Rick


"Atishoo" wrote in message
...
brilliant Rick thanks!!
is there an easy way to add to that to return the entire contents of the
cell containing the smallest number?

"Rick Rothstein (MVP - VB)" wrote:

This array-entered** formula should get you the smallest value in your
range...

=SMALL(IF(ISNUMBER(--LEFT(I18:I30,3)),--LEFT(I18:I30,3),""),1)

**commit this formula using Ctrl+Shift+Enter, not just Enter by itself

Rick


"Atishoo" wrote in message
...
=SMALL(--LEFT(I18:I30,3),1)

how do I get this function to ignore empty cells in the range I18:I30
and
to
still work when some of the numbers are less than 3 numbers in length
(there
is text as well in some cells thats why I have limited it to 3
numbers.)






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
SMALL function Wally3178 Excel Worksheet Functions 7 May 20th 08 09:52 AM
How to use small function? Eric Excel Discussion (Misc queries) 10 July 16th 07 01:28 PM
Small Function Shankidi Excel Worksheet Functions 4 February 19th 07 11:36 PM
SMALL function [email protected] Excel Discussion (Misc queries) 2 January 26th 07 06:38 PM
SMALL function if 0 Louis Excel Worksheet Functions 5 September 29th 06 06:46 PM


All times are GMT +1. The time now is 08:12 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"