Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default IF function that searches a range of cells for data and provide tr

In my profession, we only service a certain area and I'm trying to create a
spreadsheet that will tell us if the area is within our service range.
Basically, the sheet must determine that when a Zip Code is entered into a
cell (C3), if the zip code is found, the County and City populate in two
cells below it.

I have a list of counties in cells F1:M1, and a list of cities in cells
F2:M2. Also, under each of these columns, I have between 7-12 zip codes
listed. (Lets say for the first two list of cells F3:F8, ,and G3:G11).

I would like my staff to enter a Zip code into cell C3. How can I write a
function that if the zip code is found between F3:F8, the county/city names
cells F1 and F2 populate in C4 and C5 OR if the zip is between G3:G11, the
names of cells G1 and G2 populate in the same C4 and C5 cells?

OR, if it would make it any easier, I could remove a row of cells,(F2:M2) so
that I would only need the data in F1:M1 to populate in cell C4.

I hope that wasn't confusing enough for anybody :( sorry! can anybody help?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,441
Default IF function that searches a range of cells for data and provide tr

In C4, enter
=IF(COUNTIF($F$3:$H$14,C3) 0,INDEX(1:1,SUMPRODUCT(($F$3:$M$14=C3)*COLUMN($F$ 3:$M$14))),"Out of
Area")
In C5, enter
=IF(COUNTIF($F$3:$H$14,C3) 0,INDEX(2:2,SUMPRODUCT(($F$3:$M$14=C3)*COLUMN($F$ 3:$M$14))),"Out of
Area")

HTH,
Bernie
MS Excel MVP


"offdah3z" wrote in message
...
In my profession, we only service a certain area and I'm trying to create a
spreadsheet that will tell us if the area is within our service range.
Basically, the sheet must determine that when a Zip Code is entered into a
cell (C3), if the zip code is found, the County and City populate in two
cells below it.

I have a list of counties in cells F1:M1, and a list of cities in cells
F2:M2. Also, under each of these columns, I have between 7-12 zip codes
listed. (Lets say for the first two list of cells F3:F8, ,and G3:G11).

I would like my staff to enter a Zip code into cell C3. How can I write a
function that if the zip code is found between F3:F8, the county/city names
cells F1 and F2 populate in C4 and C5 OR if the zip is between G3:G11, the
names of cells G1 and G2 populate in the same C4 and C5 cells?

OR, if it would make it any easier, I could remove a row of cells,(F2:M2) so
that I would only need the data in F1:M1 to populate in cell C4.

I hope that wasn't confusing enough for anybody :( sorry! can anybody help?



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,441
Default IF function that searches a range of cells for data and provide tr

I forgot to mention that I assumed that the zip codes will be unique.

--
HTH,
Bernie
MS Excel MVP


"Bernie Deitrick" <deitbe @ consumer dot org wrote in message
...
In C4, enter
=IF(COUNTIF($F$3:$H$14,C3) 0,INDEX(1:1,SUMPRODUCT(($F$3:$M$14=C3)*COLUMN($F$ 3:$M$14))),"Out of
Area")
In C5, enter
=IF(COUNTIF($F$3:$H$14,C3) 0,INDEX(2:2,SUMPRODUCT(($F$3:$M$14=C3)*COLUMN($F$ 3:$M$14))),"Out of
Area")

HTH,
Bernie
MS Excel MVP


"offdah3z" wrote in message
...
In my profession, we only service a certain area and I'm trying to create a
spreadsheet that will tell us if the area is within our service range.
Basically, the sheet must determine that when a Zip Code is entered into a
cell (C3), if the zip code is found, the County and City populate in two
cells below it.

I have a list of counties in cells F1:M1, and a list of cities in cells
F2:M2. Also, under each of these columns, I have between 7-12 zip codes
listed. (Lets say for the first two list of cells F3:F8, ,and G3:G11).

I would like my staff to enter a Zip code into cell C3. How can I write a
function that if the zip code is found between F3:F8, the county/city names
cells F1 and F2 populate in C4 and C5 OR if the zip is between G3:G11, the
names of cells G1 and G2 populate in the same C4 and C5 cells?

OR, if it would make it any easier, I could remove a row of cells,(F2:M2) so
that I would only need the data in F1:M1 to populate in cell C4.

I hope that wasn't confusing enough for anybody :( sorry! can anybody 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
provide value to data series from named range SHETTY Charts and Charting in Excel 0 June 18th 08 01:25 PM
Setting up a validation of data listbox to provide the unique items within a range [email protected] Excel Worksheet Functions 8 July 30th 06 09:00 AM
Getting valid web searches and avoiding sites that contaminate web searches David McRitchie New Users to Excel 1 June 13th 06 03:00 AM
which formula or function searches for a value in a range of cell. Roccobarocco Excel Worksheet Functions 5 December 3rd 04 12:06 PM
which formula or function searches for a value in a range of cell. Roccobarocco Excel Worksheet Functions 7 December 3rd 04 09:06 AM


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