Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default SUM(INDEX(MATCH) for a range returns different result than SUM!

Hi.

Thanks to previous posters of this group I've learnt that in order to
have a sum in Sheet1 of the Sheet2 column that matches some expression
I must use this construct:

=SUM(INDEX(DATA,MATCH(D2,APPS,0)))

DATA:Sheet2!$B$1:$O$560, Data will not normally go beyond 200 rows, 560
is just for "security"
APPS:Sheet2!$B$1:$O$1 Headers are in B1 through O1


Now, the aforementioned formula evaluates to:
=SUM('Sheet2'!$F$1:$F$560)
which is quite good because F1 matches D2, the problem is that the
final result displayed is:
18:40:00 (data has h:mm:ss format and so has this cell)

while a normal
=SUM(('Sheet2'!F1:F560)
returns 1050:40:00 which is actually right

I copied the cell format over and over, defined DATA with or without
the headers but I cannot get the correct sum in place.

Any ideas?

Thanks for your time

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default SUM(INDEX(MATCH) for a range returns different result than SUM!

Perhaps it's just a formatting issue ..
Select the formula cell which returns: 18:40:00
Click Format Cells Number tab
Choose Custom, Type: [h]:mm:ss
(the square brackets around the "h" will prevent rollover)
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
" wrote:
Hi.

Thanks to previous posters of this group I've learnt that in order to
have a sum in Sheet1 of the Sheet2 column that matches some expression
I must use this construct:

=SUM(INDEX(DATA,MATCH(D2,APPS,0)))

DATA:Sheet2!$B$1:$O$560, Data will not normally go beyond 200 rows, 560
is just for "security"
APPS:Sheet2!$B$1:$O$1 Headers are in B1 through O1


Now, the aforementioned formula evaluates to:
=SUM('Sheet2'!$F$1:$F$560)
which is quite good because F1 matches D2, the problem is that the
final result displayed is:
18:40:00 (data has h:mm:ss format and so has this cell)

while a normal
=SUM(('Sheet2'!F1:F560)
returns 1050:40:00 which is actually right

I copied the cell format over and over, defined DATA with or without
the headers but I cannot get the correct sum in place.

Any ideas?

Thanks for your time


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
Adding "and" to Spellnumber code Ken G. Excel Discussion (Misc queries) 10 July 22nd 06 12:53 PM
VBA Monty Excel Worksheet Functions 2 January 30th 06 01:37 PM
Match function...random search? Les Excel Worksheet Functions 10 July 28th 05 11:54 AM
Amount or Numbers in Words ron New Users to Excel 6 December 24th 04 07:32 PM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


All times are GMT +1. The time now is 07:09 AM.

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"