Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 70
Default Text lookup array and match specific data

I am currently creating an Excel spreadsheet that looks up a city name and
returns the date from a different worksheet and gives me the ability to meet
a specific date month.
Worksheet 1

--Conditions--
City Name eg BRISBANE
Date: February

I want the formula to transpose the data for each row I have with the same
formula.

ie

A1 = BRISBANE
A2 = February 2008
Results
A5= 12 Feb 08
A6 = 26 Feb 08
A7= continues if data suits date condition and city condition.

Worksheet 2 sample data
eg columns and specific data
BRISBANE SYDNEY GOLD COAST
12-Feb 11-Feb 5-Feb
26-Feb 25-Feb 19-Feb
11-Mar 10-Mar 4-Mar
25-Mar 25-Mar 18-Mar
8-Apr 7-Apr 1-Apr
22-Apr 21-Apr 15-Apr

I would much appreciate some assistance with this query. I thought that I
could use the HLOOKUP feature, but I can't work out how to meet the
conditions and have it travel down the column as well.

Cheers

Fiona
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,480
Default Text lookup array and match specific data

Hi Fiona

If I understand you correctly, then I think the following works
Enter in cell A5 of Sheet1

=IF(MONTH(INDEX(Sheet2!$A$1:$E$11,ROW(A2),
MATCH(A$1,Sheet2!$A$1:$E$1,0)))<MONTH(A$2),"",
INDEX(Sheet2!$A$1:$E$11,ROW(A2),MATCH(A$1,Sheet2!$ A$1:$E$1,0)))

(Note I have wrapped the formula deliberately to prevent your newsreader
throwing breaks in awkward places. The formula is really continuous on one
line)

This assumes that the value in A2 of Sheet1 is an Excel date formatted as
mmmm yyyy, and not a Text entry of February 2008
Change the range to suit
Copy down as far as required

You might find it less "unwieldy" and easier to understand if you create
some named ranges first, e.g.
InsertNameDefine Name myTable Refers to =Sheet2!$A$1:$E$11 (or
whatever is appropriate)
InsertNameDefine Name Cities Refers to =Sheet2!$A$1:$E$1
InsertNameDefine Name myCity Refers to =Sheet1!$A$1:$E$1
InsertNameDefine Name myMonth Refers to =Sheet1!$A$2:$E$2

The formula then becomes
=IF(MONTH(INDEX(myTable,ROW(A2),
MATCH(myCity,Cities,0)))<MONTH(myMonth),"",
INDEX(myTable,ROW(A2),MATCH(myCity,Cities,0)))

The ROW() function returns 2, when it is ROW(A2), and this number will
increment automatically as you copy down sheet 1
You can also copy either formula across sheet1 if you wanted to have
multiple columns of data on Sheet1
--


Regards
Roger Govier

"Fiona" wrote in message
...
I am currently creating an Excel spreadsheet that looks up a city name and
returns the date from a different worksheet and gives me the ability to
meet
a specific date month.
Worksheet 1

--Conditions--
City Name eg BRISBANE
Date: February

I want the formula to transpose the data for each row I have with the same
formula.

ie

A1 = BRISBANE
A2 = February 2008
Results
A5= 12 Feb 08
A6 = 26 Feb 08
A7= continues if data suits date condition and city condition.

Worksheet 2 sample data
eg columns and specific data
BRISBANE SYDNEY GOLD COAST
12-Feb 11-Feb 5-Feb
26-Feb 25-Feb 19-Feb
11-Mar 10-Mar 4-Mar
25-Mar 25-Mar 18-Mar
8-Apr 7-Apr 1-Apr
22-Apr 21-Apr 15-Apr

I would much appreciate some assistance with this query. I thought that I
could use the HLOOKUP feature, but I can't work out how to meet the
conditions and have it travel down the column as well.

Cheers

Fiona


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 70
Default Text lookup array and match specific data

Roger

Thank you for your detailed response. I will give it a go and let you know.

Cheers

Fiona

"Roger Govier" wrote:

Hi Fiona

If I understand you correctly, then I think the following works
Enter in cell A5 of Sheet1

=IF(MONTH(INDEX(Sheet2!$A$1:$E$11,ROW(A2),
MATCH(A$1,Sheet2!$A$1:$E$1,0)))<MONTH(A$2),"",
INDEX(Sheet2!$A$1:$E$11,ROW(A2),MATCH(A$1,Sheet2!$ A$1:$E$1,0)))

(Note I have wrapped the formula deliberately to prevent your newsreader
throwing breaks in awkward places. The formula is really continuous on one
line)

This assumes that the value in A2 of Sheet1 is an Excel date formatted as
mmmm yyyy, and not a Text entry of February 2008
Change the range to suit
Copy down as far as required

You might find it less "unwieldy" and easier to understand if you create
some named ranges first, e.g.
InsertNameDefine Name myTable Refers to =Sheet2!$A$1:$E$11 (or
whatever is appropriate)
InsertNameDefine Name Cities Refers to =Sheet2!$A$1:$E$1
InsertNameDefine Name myCity Refers to =Sheet1!$A$1:$E$1
InsertNameDefine Name myMonth Refers to =Sheet1!$A$2:$E$2

The formula then becomes
=IF(MONTH(INDEX(myTable,ROW(A2),
MATCH(myCity,Cities,0)))<MONTH(myMonth),"",
INDEX(myTable,ROW(A2),MATCH(myCity,Cities,0)))

The ROW() function returns 2, when it is ROW(A2), and this number will
increment automatically as you copy down sheet 1
You can also copy either formula across sheet1 if you wanted to have
multiple columns of data on Sheet1
--


Regards
Roger Govier

"Fiona" wrote in message
...
I am currently creating an Excel spreadsheet that looks up a city name and
returns the date from a different worksheet and gives me the ability to
meet
a specific date month.
Worksheet 1

--Conditions--
City Name eg BRISBANE
Date: February

I want the formula to transpose the data for each row I have with the same
formula.

ie

A1 = BRISBANE
A2 = February 2008
Results
A5= 12 Feb 08
A6 = 26 Feb 08
A7= continues if data suits date condition and city condition.

Worksheet 2 sample data
eg columns and specific data
BRISBANE SYDNEY GOLD COAST
12-Feb 11-Feb 5-Feb
26-Feb 25-Feb 19-Feb
11-Mar 10-Mar 4-Mar
25-Mar 25-Mar 18-Mar
8-Apr 7-Apr 1-Apr
22-Apr 21-Apr 15-Apr

I would much appreciate some assistance with this query. I thought that I
could use the HLOOKUP feature, but I can't work out how to meet the
conditions and have it travel down the column as well.

Cheers

Fiona


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,180
Default Text lookup array and match specific data

You might like this format.
Few or no formulas needed.
http://www.freefilehosting.net/download/3alme
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
match, lookup or array? edluver Excel Worksheet Functions 0 October 21st 06 07:46 PM
table, index, array, match, lookup? spxer Excel Worksheet Functions 2 August 8th 06 09:34 PM
Lookup? Match? pulling rows from one spreadsheet to match a text f cjax Excel Worksheet Functions 3 July 21st 06 02:51 PM
lookup specific text, then apply rules JAB Excel Worksheet Functions 0 June 27th 06 05:01 PM
Only text values matching using index/match lookup - data type pro Stanton Excel Worksheet Functions 1 August 2nd 05 01:05 AM


All times are GMT +1. The time now is 10:21 PM.

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"