# Searching Multiple rows and Columns

1. ## Searching Multiple rows and Columns

I have a complex problem. I have three sheets in my workbook that I'm using. We can call them Sheet1, Sheet2, and Sheet3. On Sheet1 I have several main cities with zip codes. I need to see if the zipcode from sheet1 is found on sheet2. The problem is on Sheet2 the info is listed like this

Chicago 54654 56454 54541
NY 45465 54545 45546
Boston 54545 25456 25454

The same zipcode could be found under different cities.

Then I need to take the full Row of zipcodes that the zipcode from sheet1 is found in.

Example: If the zipcode on sheet1 was 54545 then it would take all three of the NY zip codes and all three of the Boston zipcodes. The 6 numbers are then ran against a different list of zipcodes on Sheet3 and counted how many times any of the six zipcodes come up.

This is all one formula and the output is on Sheet1.

Any suggestions?

2. ## Re: Searching Multiple rows and Columns

My first suggestion is not to try to do it all in one formula. If you're worried about appearances, you can always hide columns.

Are the zips on sheet2 in a single cell or across columns. If they are across columns, what is the range (i.e B:D, B:J)?
How are the zips in sheet3 set up? What range?

3. ## Re: Searching Multiple rows and Columns

The range of the zipcodes on Sheet2 varies. The city is found in column 1 and the zipcodes are listed in the columns to the left. The number of columns depends on the city.
In Sheet3 the zipcode is found in column E ranging from row 3 to row 704, but that may increase in the future.

4. ## Re: Searching Multiple rows and Columns

I have attached a simple worksheet to show what I'm trying to do. On Sheet1 Row 1 it will take the zipcode '11111' and look it up on Sheet2. Since it is found in Row1 it will take all 4 zipcodes in that row. It will then take those for zipcodes and count how many times they appear on Sheet3. So if you did Row2 on Sheet1 it would take the zipcode '22222' and find it in Sheet2. Since it's found on two seperate rows it takes all 7 zipcodes and finds how many times they are found on Sheet3. Copy of Book1.xlsx

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

## X vBulletin 4.1.8 Debug Information

• Page Generation 0.05879 seconds
• Memory Usage 8,906KB
• Queries Executed 15 (?)
Template Usage (32):
• (1)footer
• (1)forumrules
• (1)gobutton
• (4)memberaction_dropdown
• (1)navbar
• (4)navbar_noticebit
• (6)option
• (1)postbit_attachment
• (4)postbit_legacy
• (4)postbit_onlinestatus
• (4)postbit_wrapper
• (1)spacer_close
• (1)spacer_open
• (1)tagbit_wrapper

Phrase Groups Available (6):
• global
• inlinemod
• postbit
• posting
• reputationlevel
Included Files (39):
• ./vbseo.php
• ./env.php
• ./vbseo/includes/functions_vbseo.php
• ./vbseo/includes/functions_vbseo_pre.php
• ./vbseo/includes/functions_vbseo_url.php
• ./vbseo/includes/functions_vbseo_createurl.php
• ./vbseo/includes/functions_vbseo_db.php
• ./vbseo/includes/functions_vbseo_vb.php
• ./vbseo/includes/functions_vbseo_seo.php
• ./vbseo/includes/functions_vbseo_misc.php
• ./vbseo/includes/functions_vbseo_crr.php
• ./vbseo/includes/functions_vbseo_cache.php
• ./vbseo/includes/functions_vbseo_hook.php
• ./vbseo/includes/functions_vbseo_startup.php
• ./includes/config.php
• ./global.php
• ./includes/class_bootstrap.php
• ./includes/init.php
• ./includes/class_core.php
• ./includes/functions.php
• ./includes/class_friendly_url.php
• ./includes/class_hook.php
• ./includes/functions_cforum.php
• ./includes/functions_bigthree.php
• ./includes/class_postbit.php
• ./includes/class_bbcode.php
• ./includes/functions_reputation.php
• ./includes/class_bootstrap_framework.php
• ./vb/vb.php
• ./vb/phrase.php
• ./packages/vbattach/attach.php
• ./vb/types.php
• ./vb/cache.php
• ./vb/cache/db.php
• ./vb/cache/observer/db.php
• ./vb/cache/observer.php
• ./includes/functions_notice.php

Hooks Called (48):
• init_startup
• friendlyurl_resolve_class
• database_pre_fetch_array
• database_post_fetch_array
• global_bootstrap_init_start
• global_bootstrap_init_complete
• cache_permissions
• fetch_foruminfo
• global_state_check
• global_bootstrap_complete
• global_start
• style_fetch
• global_setup_complete
• friendlyurl_redirect_canonical
• bbcode_fetch_tags
• bbcode_create
• postbit_factory
• postbit_display_start
• cache_templates
• template_register_var
• parse_templates
• notices_check_start
• notices_noticebit
• process_templates_complete
• reputation_image
• postbit_imicons
• bbcode_parse_start
• bbcode_parse_complete_precache
• bbcode_parse_complete
• postbit_display_complete
• memberaction_dropdown
• postbit_attachment
• tag_fetchbit
• tag_fetchbit_complete
• forumrules