Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Len Len is offline
external usenet poster
 
Posts: 162
Default Lookup value

Hi,

Look up value is a date

If lookup value in Sheet1 is cell C2 = 28/3/2005
then sum up the value of range from cell A1 to A10 in Sheet2 when the
lookup value in Sheet1 is matched against the date from cell C1 to
C110
Thus, the result should be 20,490.20 ( ie sum up cell A3,A7 to A10 when
cell C3,C7 to C10 are matched with the date 28/3/2005 )
Sheet2
A B C
1 9,006.30 100050 01/03/2005
2 100.00 100050 01/03/2005
3 144.00 138616 28/03/2005
4 20.00 600045 24/03/2005
5 7,215.30 100001 25/03/2005
6 2,000.00 600139 25/03/2005
7 906.00 155661 28/03/2005
8 16,754.00 138615 28/03/2005
9 2,560.00 138617 28/03/2005
10 126.20 138618 28/03/2005

How to set a formula or VBA code to arrive the above result ?

Please help, Thanks
Regards
Len

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,339
Default Lookup value

Enter the following into the required cell in Sheet2 and press
Shift+Ctrl+Enter to enter as an array formula

=SUM((C1:C10=Sheet1!C2)*(A1:A10))

This will appear as

{=SUM((C1:C10=Sheet1!C2)*(A1:A10))}

HTH

"Len" wrote:

Hi,

Look up value is a date

If lookup value in Sheet1 is cell C2 = 28/3/2005
then sum up the value of range from cell A1 to A10 in Sheet2 when the
lookup value in Sheet1 is matched against the date from cell C1 to
C110
Thus, the result should be 20,490.20 ( ie sum up cell A3,A7 to A10 when
cell C3,C7 to C10 are matched with the date 28/3/2005 )
Sheet2
A B C
1 9,006.30 100050 01/03/2005
2 100.00 100050 01/03/2005
3 144.00 138616 28/03/2005
4 20.00 600045 24/03/2005
5 7,215.30 100001 25/03/2005
6 2,000.00 600139 25/03/2005
7 906.00 155661 28/03/2005
8 16,754.00 138615 28/03/2005
9 2,560.00 138617 28/03/2005
10 126.20 138618 28/03/2005

How to set a formula or VBA code to arrive the above result ?

Please help, Thanks
Regards
Len


  #3   Report Post  
Posted to microsoft.public.excel.programming
Len Len is offline
external usenet poster
 
Posts: 162
Default Lookup value


Hi Toppers,

Thanks, it works

Regards
Len

Toppers wrote:
Enter the following into the required cell in Sheet2 and press
Shift+Ctrl+Enter to enter as an array formula

=SUM((C1:C10=Sheet1!C2)*(A1:A10))

This will appear as

{=SUM((C1:C10=Sheet1!C2)*(A1:A10))}

HTH

"Len" wrote:

Hi,

Look up value is a date

If lookup value in Sheet1 is cell C2 = 28/3/2005
then sum up the value of range from cell A1 to A10 in Sheet2 when

the
lookup value in Sheet1 is matched against the date from cell C1 to
C110
Thus, the result should be 20,490.20 ( ie sum up cell A3,A7 to A10

when
cell C3,C7 to C10 are matched with the date 28/3/2005 )
Sheet2
A B C
1 9,006.30 100050 01/03/2005
2 100.00 100050 01/03/2005
3 144.00 138616 28/03/2005
4 20.00 600045 24/03/2005
5 7,215.30 100001 25/03/2005
6 2,000.00 600139 25/03/2005
7 906.00 155661 28/03/2005
8 16,754.00 138615 28/03/2005
9 2,560.00 138617 28/03/2005
10 126.20 138618 28/03/2005

How to set a formula or VBA code to arrive the above result ?

Please help, Thanks
Regards
Len



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
lookup help. lookup result based on data in 2 columns lcc Excel Worksheet Functions 3 April 6th 10 01:20 PM
LOOKUP FUNCTION? (LOOKUP VALUE BEING A TIME RENERATED FROM A FORMU JCC Excel Discussion (Misc queries) 5 June 26th 09 09:15 PM
Lookup looks to the prior column if zero appears in the lookup col kenbquik Excel Discussion (Misc queries) 2 March 12th 09 03:41 AM
Join 2 Lists - Lookup value in 1 list & use result in 2nd lookup JBush Excel Worksheet Functions 3 January 3rd 07 11:14 PM
Pivot table doing a lookup without using the lookup function? NGASGELI Excel Discussion (Misc queries) 0 August 2nd 05 05:08 AM


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