# Excel value lookup and view in sheet

I have a workbook that has three sheets. I need to accomplish 2 things,

1. In the summary sheet, I need to use an index or sumproduct to look up matching set of origin & destination zips and return zone. (zip sheet column C).
The origin and destination zips get entered on Summary sheet in 5 digit.
However, the lookup is for only RIGHT (3) numbers.
I have been usuccessfully  using the following formula, but at least you can see what I am going for.
=SUMPRODUCT((Zone!\$A\$2:\$A\$932872=TRIM(RIGHT(VALUE(B2),3)))*(Zone!\$B\$2:\$B\$932872=TRIM(RIGHT(VALUE(C2),3))),(Zone!\$C\$2:\$C\$932872))

2. Depending on the code in B4, I would like to show the data from RATE sheet beginning in cell B7. If I can it to work for the following, I can adjust for additional codes.

if B4 = PO show Rate!A32 in Summary sheet starting B7.
It can show everything below Rate!A32

THANKS!!!
Sample.xlsx
###### Who is Participating?

x

EngineerCommented:
I am working on it.
0

EngineerCommented:
Try

=SUMPRODUCT((Zone!\$A\$2:\$A\$932872=VALUE(RIGHT(B2,3)))*(Zone!\$B\$2:\$B\$932872=VALUE(RIGHT(C2,3))),(Zone!\$C\$2:\$C\$932872))
0

EngineerCommented:
I am struggling to understand what you are asking in part 2. Can you show the intended result in a workbook?
0

Author Commented:
This shows if PO is in Summary!B4 - Rate!A32 begins the view.

If SO is in Summary!B4, - Rate!A200 begins the view.

Hope that helps!!
0

Author Commented:
Sorry, example did not attach on previous.
Sample.xlsx
0

EngineerCommented:
How can I relate PO with A32?
0

Author Commented:
I was only thinking to hard code it to the location in Rate tab.
0

Author Commented:
If I used the code PO in the Rate tab, could I have it search for that location in Rate tab?
Not sure best option.
0

EngineerCommented:
Yes, the text in the summary tab should be identical to the text in the rate tab.

There is also an option to set up a lookup table listing PO against whatever is the expanded form and that table is used to look up the appropriate location.

BTW did the formula work as desired?
0

Author Commented:
The formula worked perfectly, thanks!! I put it in the second example workbook that I uploaded.

Do you think that you can help to show Rate data in the Summary tab by using the A4 field?
Thanks again!
0

Author Commented:
Saquib,
Can you help me with this or should I accept this request and enter step 2 on another request?

Thanks!
Beth
0

EngineerCommented:
Complete the list on the Codes sheet and then you can change the code on the summary sheet to see the appropriate table. Remember that to use this you need to have macros enabled.
Sample-2.xlsm
0

Author Commented:
WOW, so great!! Thank you so much, it's perfect!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.