Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default Excel Formula Help

Hi there,
I work in the mobile industry running campaigns and so forth. We received
the sms entry report in a excel spreadsheet.
What I need to do is find the region of entrants. The Entry Data report has
the date, Cell number and text which was entered across columns.
What I did was, I created a table of Cities of South Africa and in which
province they are in.
I need to match the name of the city found in the entry text to the nam of
the city in the table that I have created and the result should be the
province.
Can this be done ?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 76
Default Excel Formula Help

use the following function

=index(array,,column_num)




"Roseygains" wrote:

Hi there,
I work in the mobile industry running campaigns and so forth. We received
the sms entry report in a excel spreadsheet.
What I need to do is find the region of entrants. The Entry Data report has
the date, Cell number and text which was entered across columns.
What I did was, I created a table of Cities of South Africa and in which
province they are in.
I need to match the name of the city found in the entry text to the nam of
the city in the table that I have created and the result should be the
province.
Can this be done ?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,339
Default Excel Formula Help

A2=City (from your text)
Sheet2 columns A&B contain table of Cities vs Province

=VLOOKUP(A2,SHEET2!a:b,2,0)

will return province

Or

=if(isna(VLOOKUP(A2,SHEET2!a:b,2,0)),"",VLOOKUP(A2 ,SHEET2!a:b,2,0))

will return blank if not found

HTH


"Roseygains" wrote:

Hi there,
I work in the mobile industry running campaigns and so forth. We received
the sms entry report in a excel spreadsheet.
What I need to do is find the region of entrants. The Entry Data report has
the date, Cell number and text which was entered across columns.
What I did was, I created a table of Cities of South Africa and in which
province they are in.
I need to match the name of the city found in the entry text to the nam of
the city in the table that I have created and the result should be the
province.
Can this be done ?

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default Excel Formula Help

Thanks Toppers, but A2 doesn't only contain the city.
This is the sample of the two samples where C2 & C3 in the entry data
contains the city.

Entry Data

A B C D
1 Date Cell Number Message Province
2 2007/04/27 2782xxxxxxx 324De Port Elizabeth
3 2007/04/28 2772xxxxxxx 856Et Cape Town


City List

A B
1 Name Province
2 Port Elizebeth Eastern Cape
3 Cape Town Western Cape


"Toppers" wrote:

A2=City (from your text)
Sheet2 columns A&B contain table of Cities vs Province

=VLOOKUP(A2,SHEET2!a:b,2,0)

will return province

Or

=if(isna(VLOOKUP(A2,SHEET2!a:b,2,0)),"",VLOOKUP(A2 ,SHEET2!a:b,2,0))

will return blank if not found

HTH


"Roseygains" wrote:

Hi there,
I work in the mobile industry running campaigns and so forth. We received
the sms entry report in a excel spreadsheet.
What I need to do is find the region of entrants. The Entry Data report has
the date, Cell number and text which was entered across columns.
What I did was, I created a table of Cities of South Africa and in which
province they are in.
I need to match the name of the city found in the entry text to the nam of
the city in the table that I have created and the result should be the
province.
Can this be done ?

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default Excel Formula Help

Thanks for your reply Cresta, I tried yo formula but it didn't work.
You the problem comes in where it is not only the City that will be in a
cell but a string eg. Hi I live in Pretoria. I need to know how I can search
that cell for the city that matches in the table on the City sheet rang
A2:A100 and the results is the corresponding value in sheet [City] B2:B100.

Hope that makes some sense.

"Cresta" wrote:

use the following function

=index(array,,column_num)




"Roseygains" wrote:

Hi there,
I work in the mobile industry running campaigns and so forth. We received
the sms entry report in a excel spreadsheet.
What I need to do is find the region of entrants. The Entry Data report has
the date, Cell number and text which was entered across columns.
What I did was, I created a table of Cities of South Africa and in which
province they are in.
I need to match the name of the city found in the entry text to the nam of
the city in the table that I have created and the result should be the
province.
Can this be done ?



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,339
Default Excel Formula Help

If the format of column C is always as your example, then:

=MID(C1,7,255) will get the City

so try ......

=VLOOKUP(MID(C1,7,255),SHEET2!a:b,2,0)

HTH


"Roseygains" wrote:

Thanks Toppers, but A2 doesn't only contain the city.
This is the sample of the two samples where C2 & C3 in the entry data
contains the city.

Entry Data

A B C D
1 Date Cell Number Message Province
2 2007/04/27 2782xxxxxxx 324De Port Elizabeth
3 2007/04/28 2772xxxxxxx 856Et Cape Town


City List

A B
1 Name Province
2 Port Elizebeth Eastern Cape
3 Cape Town Western Cape


"Toppers" wrote:

A2=City (from your text)
Sheet2 columns A&B contain table of Cities vs Province

=VLOOKUP(A2,SHEET2!a:b,2,0)

will return province

Or

=if(isna(VLOOKUP(A2,SHEET2!a:b,2,0)),"",VLOOKUP(A2 ,SHEET2!a:b,2,0))

will return blank if not found

HTH


"Roseygains" wrote:

Hi there,
I work in the mobile industry running campaigns and so forth. We received
the sms entry report in a excel spreadsheet.
What I need to do is find the region of entrants. The Entry Data report has
the date, Cell number and text which was entered across columns.
What I did was, I created a table of Cities of South Africa and in which
province they are in.
I need to match the name of the city found in the entry text to the nam of
the city in the table that I have created and the result should be the
province.
Can this be done ?

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
Excel 2002 Formula: Urgent Conditional Formula Required Right Away - if possible blue[_2_] Excel Discussion (Misc queries) 2 July 11th 07 06:08 PM
Build excel formula using field values as text in the formula val kilbane Excel Worksheet Functions 2 April 18th 07 01:52 PM
Excel 2002 formula displayed not value formula option not checked Dean Excel Worksheet Functions 1 February 28th 06 02:31 PM
i edit a formula (excel) then it displays formula not answer caiman Excel Discussion (Misc queries) 2 September 9th 05 02:09 AM
Converting an Excel formula to an Access query formula Adam Excel Discussion (Misc queries) 1 December 15th 04 03:38 AM


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