Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 83
Default Looking up data with varying Lookup_value

I'm trying to produce a report which summarises data by country, when the raw
data is given by country - region viz:

Australia - Canberra 765.4
Australia - Melbourne 18796.3
Australia - Mobile 9290.3
Australia - Satellite 3.4
Australia - Sydney 29872

I need a function which will look up all the column B values where column A
contains 'Australia' and then sum them in a single 'Australia' cell. The sum
part is not so hugely important, I know I can work around this, but the key
function is to be able to isolate a range of data based on part of the
adjoining cell text. I can currently only make VLOOKUP isolate the value
corresponding to the 'highest' value in column A containing 'Australia' using
the following:

=VLOOKUP("Australia*",'Client Input'!A:B,2)

I think I'm barking up the right tree but I'm stuck for ideas. Please help!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,480
Default Looking up data with varying Lookup_value

Hi Jake

One way
=SUMPRODUCT((ISNUMBER(FIND("Australia",$A$1:$A$100 )))*$B$1:$B$100)

Change ranges to suit.

--
Regards
Roger Govier



"jake" wrote in message
...
I'm trying to produce a report which summarises data by country, when the
raw
data is given by country - region viz:

Australia - Canberra 765.4
Australia - Melbourne 18796.3
Australia - Mobile 9290.3
Australia - Satellite 3.4
Australia - Sydney 29872

I need a function which will look up all the column B values where column
A
contains 'Australia' and then sum them in a single 'Australia' cell. The
sum
part is not so hugely important, I know I can work around this, but the
key
function is to be able to isolate a range of data based on part of the
adjoining cell text. I can currently only make VLOOKUP isolate the value
corresponding to the 'highest' value in column A containing 'Australia'
using
the following:

=VLOOKUP("Australia*",'Client Input'!A:B,2)

I think I'm barking up the right tree but I'm stuck for ideas. Please
help!



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Looking up data with varying Lookup_value

=SUMPRODUCT(--(LEFT(A1:A5,9)="Australia"),B1:B5)
or
=SUMIF(A1:A5,"Australia*",B1:B5)


"jake" wrote:

I'm trying to produce a report which summarises data by country, when the raw
data is given by country - region viz:

Australia - Canberra 765.4
Australia - Melbourne 18796.3
Australia - Mobile 9290.3
Australia - Satellite 3.4
Australia - Sydney 29872

I need a function which will look up all the column B values where column A
contains 'Australia' and then sum them in a single 'Australia' cell. The sum
part is not so hugely important, I know I can work around this, but the key
function is to be able to isolate a range of data based on part of the
adjoining cell text. I can currently only make VLOOKUP isolate the value
corresponding to the 'highest' value in column A containing 'Australia' using
the following:

=VLOOKUP("Australia*",'Client Input'!A:B,2)

I think I'm barking up the right tree but I'm stuck for ideas. Please help!

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Looking up data with varying Lookup_value

I'm afraid there's too much barking and not enough, well... What exactly do
you want to lookup?

What is it that you actually want? It doesn't really look like you want to
'lookup' something, 'v' or otherwise. Rather, you want to sum a batch of
records based upon a criterion.

Why do you have the country and region in the same column? Split column A
into two -- Australia in A and Canberra in B for the first row. There is no
value, save lassitude, in having them combined this way.

Then, you could easily do something simple like this...

Australia Canberra 765.4
Australia Melbourne 18796.3
Australia Mobile 9290.3
Australia Satellite 3.4
Australia Sydney 29872

Australia 58727.4

Where the 58727.4 formula is =SUMIF(A1:A5,B7,C1:C5) with B7 being the word
'Australia' beside the sum. The advantage of this is that you could put any
country name you chose and get the corresponding sum.


If you insist on keeping a single column (sigh), then how about:

Australia - Canberra 765.4
Australia - Melbourne 18796.3
Australia - Mobile 9290.3
Australia - Satellite 3.4
Australia - Sydney 29872

=SUMIF(A1:A5,"Australia*",B1:B5)


On 9/13/07 12:42 PM, in article
, "jake"
wrote:

I'm trying to produce a report which summarises data by country, when the raw
data is given by country - region viz:

Australia - Canberra 765.4
Australia - Melbourne 18796.3
Australia - Mobile 9290.3
Australia - Satellite 3.4
Australia - Sydney 29872

I need a function which will look up all the column B values where column A
contains 'Australia' and then sum them in a single 'Australia' cell. The sum
part is not so hugely important, I know I can work around this, but the key
function is to be able to isolate a range of data based on part of the
adjoining cell text. I can currently only make VLOOKUP isolate the value
corresponding to the 'highest' value in column A containing 'Australia' using
the following:

=VLOOKUP("Australia*",'Client Input'!A:B,2)

I think I'm barking up the right tree but I'm stuck for ideas. Please help!


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
Can SUMPRODUCT be used to extract varying data in a column? Jakki Excel Worksheet Functions 8 August 25th 06 09:39 PM
transposing vertical data to horizontal with varying amount of data Ghosty Excel Discussion (Misc queries) 5 August 1st 06 05:20 AM
Varying data on X axis coa01gsb Charts and Charting in Excel 2 February 6th 06 02:48 PM
Ability to sum data by varying dates chopsx7 Excel Worksheet Functions 2 August 9th 05 05:02 PM
Aligning data with varying decimal places edpaul Excel Discussion (Misc queries) 1 February 11th 05 12:42 AM


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