LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,886
Default SUMIF or SUMPRODUCT to total cells containing multiple texts

Personally, I think he should re-design his spreadsheet <bg

Well, funnily enough, that thought also crossed my mind<g
but seeing as he was using the last 2 columns, I wondered whether it was
so horrendous that all columns were being used, and the values couldn't
be split out into other columns. That's why I opted for using 2nd sheet.

--
Regards

Roger Govier


"Bob Phillips" wrote in message
...
Sorry about the IU IV, I built it using U and V as I could see those
columns.

Personally, I think he should re-design his spreadsheet <bg

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Roger Govier" wrote in message
...
Hi Bob

Phhhewwww.....
That's great.
Just a very small point, the OP was using IU and IV for his columns
for
the lookup table, not U and I and he did not say he was using Sheet2.
I
used a second sheet in my suggestion.
As long as he makes those minor mods, he will have a superb solution.

I had totally missed that there were comma's separating the values in
the source cell in my rather mundane solution which would necessitate
a
change to the formula to
=IF(Sheet1!A1="","",MID(Sheet1!$A1,1+(COLUMN(A1)-1)*4,2))

I think he should go with your solution.

--
Regards

Roger Govier


"Bob Phillips" wrote in message
...
I managed it with a formula that basically looks like this assuming
the
data
is in B2

=SUM(TRANSPOSE(OFFSET($V$1,TRANSPOSE(

IF(ISNUMBER(MATCH(MID(SUBSTITUTE(Sheet2!B2,",","") ,ROW(INDIRECT("1:"&LEN(SUB
STITUTE(Sheet2!B2,",","")))),2),Sheet2!$U$1:$U$50, 0)),

MATCH(MID(SUBSTITUTE(Sheet2!B2,",",""),ROW(INDIREC T("1:"&LEN(SUBSTITUTE(Shee
t2!B2,",","")))),2),Sheet2!$U$1:$U$50,0),1))-1,0)))

Unfortunately, that has too many nested functions, so I had to
split
out


MATCH(MID(SUBSTITUTE(Sheet2!B2,",",""),ROW(INDIREC T("1:"&LEN(SUBSTITUTE(Shee
t2!B2,",","")))),2),Sheet2!$U$1:$U$50,0)

and define it as a name (Ctrl-F3). I used a name of matches and a
Refersto
value of


=MATCH(MID(SUBSTITUTE(Sheet2!B2,",",""),ROW(INDIRE CT("1:"&LEN(SUBSTITUTE(She
et2!B2,",","")))),2),Sheet2!$U$1:$U$50,0)

and then my formula is


=SUM(TRANSPOSE(OFFSET($V$1,TRANSPOSE(IF(ISNUMBER(m atches),matches,1))-1,0)))

which is an array formula, it should be committed with
Ctrl-Shift-Enter, not
just Enter.

I also had to enter a dummy value in row 1 of your lookup table
with a
weight of 0 to get it to work.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Terranoman" wrote in
message
...
I am attempting to set up a spreadsheet whereby I can summarise
the
weight
load of a vehicle. The cells will contain a variation of
abbreviated
texts
in the same cell e.g.

An example of column B contents is ah, zy, pd, (in a single cell
on
each
row)

Each abbreviation will have it's own unique number (weight)
allocated
in
two
seperate column which the formula will refer to - i.e

Column IU IV
Row 1 ah 2.2
Row 2 zy 3.7
Row 3 pd 1.4

There will be approximately 50 such text references and values.

Currently column b (rows 1 to 50) contain the varied text (ah, zy,
pd
etc
in
a single cell). Is it possible to 'find' the idividual text
abbreviation
(ah, zy or pd) in column B and total the allocated weight using
sumif
or
sumproduct even though they are in the same cell?

Any suggestions greatly appreciated.








 
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
How to use SUMIF to return sums between two values located in cells ScottBerger Excel Worksheet Functions 2 April 23rd 23 09:05 PM
Grand total time between two total cells Gwynn Excel Discussion (Misc queries) 4 May 9th 06 09:00 PM
SUMIF with multiple criteria macquarl Excel Discussion (Misc queries) 4 January 5th 06 02:18 AM
how can i ignore blank cells when multiple cells? arash Excel Worksheet Functions 4 November 17th 05 04:35 PM
using sumif & countif to sort multiple cells floridasurfn Excel Worksheet Functions 3 February 27th 05 09:23 PM


All times are GMT +1. The time now is 08:39 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"