Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Problem - lookup formula


I need urgent help with this ;) I've been trying to find a formula for
hours with no luck!!

I need to perform lookup using two rows as a criteria...


I have two problems:


Problem 1.- I have a file containing the data I want to lookup for
(i.e. ratings):

philippines
2007 rating 1
2005 rating 2
2000 rating 3
1989 rating 4
...


brazil
2000 rating 5
1995 rating 6

usa
1970 rating 7
1985 rating 8

etc
(180 countries)

and i have to copy the ratings in a file that looks like this:

argentina 1980 rating
argentina 1981 rating
argentina 1982 rating
(...)
argentina 2007 rating
(...)
zambia 1980
(...)
zambia 2007

(180 countries)

any ideas on how to solve this?

Problem 2 .- I have other ratings in the following format:

country 1 year 1 rating 1
country 1 year 2 rating2
etc

that need to be looked up and imported in a sheet in the following
format:

argentina 1980 rating
argentina 1981 rating
argentina 1982 rating
argentina 2007 rating
....
zambia 1980
etc
zambia 2007

Thanks a lot!


Laura.




--
laurafv
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,441
Default Problem - lookup formula

Laura,

Start by transforming your Ratings file - by entering a formula in another
column where you combine the values.

Say that Philippines is in cell A2, and your other values are all in cells
in column A, with a single blank cell between countries. Make sure that A1
is blank, and then in D2, enter this formula

=IF(A1="",A2,D1)

and in E2, enter this formula:

=IF(AND(A2<D2,A2<""),A2,"")

and copy both of those down the column to match column A.

Then copy columns D and E and paste special values, then sort D and E based
on column E, and delete the cells in D and E where column E is empty, then
resort based on Column D. Then use Data / Text to columns on column E, with
space as the delimiter. Then you'll have a database of values, and you can
either combine the country and year to get a key value to use with VLOOKUPs,
or use SUMPRODUCT formulas to extract the data.

HTH,
Bernie
MS Excel MVP



"laurafv" wrote in message
...

I need urgent help with this ;) I've been trying to find a formula for
hours with no luck!!

I need to perform lookup using two rows as a criteria...


I have two problems:


Problem 1.- I have a file containing the data I want to lookup for
(i.e. ratings):

philippines
2007 rating 1
2005 rating 2
2000 rating 3
1989 rating 4
..


brazil
2000 rating 5
1995 rating 6

usa
1970 rating 7
1985 rating 8

etc
(180 countries)

and i have to copy the ratings in a file that looks like this:

argentina 1980 rating
argentina 1981 rating
argentina 1982 rating
(...)
argentina 2007 rating
(...)
zambia 1980
(...)
zambia 2007

(180 countries)

any ideas on how to solve this?

Problem 2 .- I have other ratings in the following format:

country 1 year 1 rating 1
country 1 year 2 rating2
etc

that need to be looked up and imported in a sheet in the following
format:

argentina 1980 rating
argentina 1981 rating
argentina 1982 rating
argentina 2007 rating
...
zambia 1980
etc
zambia 2007

Thanks a lot!


Laura.




--
laurafv



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Problem - lookup formula


Thanks a lot!




--
laurafv
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 Problem CCripe Excel Worksheet Functions 1 February 25th 08 07:42 PM
lookup problem [email protected] Excel Discussion (Misc queries) 5 December 26th 06 10:03 PM
problem with v lookup Elliott Excel Discussion (Misc queries) 3 April 20th 06 12:06 PM
little problem with lookup i think jose001 Excel Discussion (Misc queries) 1 March 27th 06 11:50 AM
HELP -- probably a LOOKUP problem Liz-In-USA Excel Discussion (Misc queries) 3 December 9th 04 12:18 AM


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