how can I put the data from the second sheet in the first sheet?

D

diaExcel

I have several problems with to match the data between sheets in an excel
workbook.

I have the second sheet with column A for city_name, column B for city_code
and column C for area_id:
A B C

Afghanistan 93 5
Afghanistan 9320 2712
Afghanistan 937 2713
Albania 355 232
Albania 355873 2991
Albania 35568 1677
Albania 355265 4223
Albania 35532 3888
Albania 35548 4243
Albania 35569 1678
Albania 35547 4241
Colombia 57 1785
Colombia 5767 2479
Colombia 575 2245
Colombia 57315 2622
Colombia 571 2212
Colombia 5776 2480
Colombia 572 2213
Colombia 5753 2701
Colombia 5768 2481
Colombia 574 2246

and the first sheet with column A fro city_name, column B for city_code and
column C for area_id (wich I wanted to be the data from the column C from the
sheet 2):

A B C
AFGHANISTAN 93
AFGHANISTAN-MOBILE 9370
AFGHANISTAN-MOBILE 9375
AFGHANISTAN-MOBILE TPCA 9377
AFGHANISTAN-MOBILE TPCA 9379
ALBANIA 355
ALBANIA-MOBILE AMC 35568
ALBANIA-MOBILE VODAFONE 35569
COLOMBIA BELLSOUTH-RM 57315
COLOMBIA BELLSOUTH-RM 57316
COLOMBIA BELLSOUTH-RM 57317
COLOMBIA BELLSOUTH-RM 57318
COLOMBIA BOGOTA-Reg 5712
COLOMBIA BOGOTA-Reg 5713
COLOMBIA BOGOTA-Reg 5714
COLOMBIA BOGOTA-Reg 5715
COLOMBIA BOGOTA-Reg 5716
COLOMBIA BOGOTA-Reg 5717
COLOMBIA CALI-Reg 5723
COLOMBIA CALI-Reg 5724
COLOMBIA CALI-Reg 5725
COLOMBIA CALI-Reg 5726
COLOMBIA CALI-Reg 57288
COLOMBIA CALI-Reg 57289


For matching those codes I used the formula:
{sum(if(a1=city_name,if(b1=city_code,area_id)))} but not all the data was
match, because sometime the rows from the two sheet aren't the same, so what
can I, maybe with a procedure or somthing...and I have onother problem for
exemple in sheet 2 for Colombia 572 I have the area_id=2213 and I wanted to
put in the sheet 1 at all rows with Colombia 5723, 5724, 5725...this area_id
2213, I mean for all rows that beging with the city_code from sheet 2(in this
case with 572), how can I do that?


Thank you so much!!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top