Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
oops
 
Posts: n/a
Default Wildcards in functions

I need to pick certain cells from a calendar, and add the numbers in those
cells. The problem I am running into is that my data is entered in random
cells, and in following format: I8, I3, I5. I need to find all the cells with
data beginning with the "I", and then add the numbers in the cells. from
above examples, it would be 8+3+5 for a total of 16. I have been trying the
countif function, but no luck yet. Any Ideas?
  #2   Report Post  
Dave Breitenbach
 
Posts: n/a
Default

try this...(change m31:m33 to whatever range you'd like to cover)

=SUMPRODUCT(--(LEFT($M$31:$M$33,1)="I"),--(RIGHT($M$31:$M$33,LEN($M$31:$M$33)-1)))

"oops" wrote:

I need to pick certain cells from a calendar, and add the numbers in those
cells. The problem I am running into is that my data is entered in random
cells, and in following format: I8, I3, I5. I need to find all the cells with
data beginning with the "I", and then add the numbers in the cells. from
above examples, it would be 8+3+5 for a total of 16. I have been trying the
countif function, but no luck yet. Any Ideas?

  #3   Report Post  
oops
 
Posts: n/a
Default

This formuls is working only when I have an "I" value in every cell of the
range. For ex., If I put I5 in each of the cells m31:m33, I get a "15", which
is correct. If I leave a cell blank, or with any other value than an I, I get
the dreaded #value! error. Any other ideas out there? I thank you for the
help so far!!

"Dave Breitenbach" wrote:

try this...(change m31:m33 to whatever range you'd like to cover)

=SUMPRODUCT(--(LEFT($M$31:$M$33,1)="I"),--(RIGHT($M$31:$M$33,LEN($M$31:$M$33)-1)))

"oops" wrote:

I need to pick certain cells from a calendar, and add the numbers in those
cells. The problem I am running into is that my data is entered in random
cells, and in following format: I8, I3, I5. I need to find all the cells with
data beginning with the "I", and then add the numbers in the cells. from
above examples, it would be 8+3+5 for a total of 16. I have been trying the
countif function, but no luck yet. Any Ideas?

  #4   Report Post  
Harlan Grove
 
Posts: n/a
Default

oops wrote...
This formuls is working only when I have an "I" value in every cell of the
range. For ex., If I put I5 in each of the cells m31:m33, I get a "15", which
is correct. If I leave a cell blank, or with any other value than an I, I get
the dreaded #value! error. Any other ideas out there? I thank you for the
help so far!!

"Dave Breitenbach" wrote:
try this...(change m31:m33 to whatever range you'd like to cover)

=SUMPRODUCT(--(LEFT($M$31:$M$33,1)="I"),--(RIGHT($M$31:$M$33,LEN($M$31:$M$33)-1)))

....

Change the formula above to

=SUMPRODUCT(--(LEFT($M$31:$M$33,1)="I"),--("0"&MID($M$31:$M$33,2,256)))

  #5   Report Post  
oops
 
Posts: n/a
Default

Thanks Harlan!!

"Harlan Grove" wrote:

oops wrote...
This formuls is working only when I have an "I" value in every cell of the
range. For ex., If I put I5 in each of the cells m31:m33, I get a "15", which
is correct. If I leave a cell blank, or with any other value than an I, I get
the dreaded #value! error. Any other ideas out there? I thank you for the
help so far!!

"Dave Breitenbach" wrote:
try this...(change m31:m33 to whatever range you'd like to cover)

=SUMPRODUCT(--(LEFT($M$31:$M$33,1)="I"),--(RIGHT($M$31:$M$33,LEN($M$31:$M$33)-1)))

....

Change the formula above to

=SUMPRODUCT(--(LEFT($M$31:$M$33,1)="I"),--("0"&MID($M$31:$M$33,2,256)))


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
Confused about arrays and ranges in functions Llurker Excel Worksheet Functions 0 July 7th 05 05:44 AM
Wildcards in Functions Graeme Crook Excel Worksheet Functions 1 June 10th 05 10:42 PM
Wildcards in Functions Graeme Crook Excel Worksheet Functions 1 June 9th 05 11:31 PM
Default User Defined Functions - How? flycast Excel Discussion (Misc queries) 4 May 26th 05 04:26 AM
PASTE DOWN FUNCTIONS jackle Excel Worksheet Functions 0 May 25th 05 02:10 PM


All times are GMT +1. The time now is 04:29 PM.

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

About Us

"It's about Microsoft Excel"