Thread: update columns
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Glenn Glenn is offline
external usenet poster
 
Posts: 1,240
Default update columns

andrew wrote:
hello,
in page1 I have this list:
LVSNR
AL14898725
AL14903075
AL14904364
AL14904710

in page2 this chart:

LVSNR AKNUS AKDTA AKTIM
AL14898725 852685970 1090129 6
AL14898725 852685970 1090129 220616
AL14898725 852685970 1090130 222827
AL14898725 852685970 1090131 52832
AL14903075 854309220 1090131 1103
AL14904364 854843700 1090130 213509
AL14904364 854843700 1090130 52832
AL14904710 855050800 1090130 23823

i'm lookinf for a formula or function to update the columns next to the list
in page1, looking the correspondent at the chart and taking the 4th column
value.
the data are not univocal in the chart, so CERCA.VERT(excel italian
version) is not a right way and neighter automatic filter is right way to
solve the question, becous I have about 40.000 of records.
I wish the result was this:

LVSNR AKTIM1 AKTIM2 AKTIM3 AKTIM4
AL14898725 6 220616 222827 52832
AL14903075 1103
AL14904364 213509 52832
AL14904710 23823

Please help me... a VBA script or a function,
thanks a lot to everyone wanna help me.


In cell B2 on page1:

=IF(COLUMN()-1COUNTIF(page2!$A$2:$A$9,$A2),"",
INDEX(page2!$D$2:$D$9,MATCH($A2,page2!$A$2:$A$9,0) ))

Copy down as needed.

In cell C2 on page1 enter this array formula (commit with CTRL+SHIFT+ENTER):

=IF(COLUMN()-1COUNTIF(page2!$A$2:$A$9,$A2),"",
INDEX(INDIRECT("page2!D"&MATCH($A2&B2,page2!$A$2:$ A$9&page2!$D$2:$D$9,0)+2&":D9"),
MATCH($A2,INDIRECT("page2!A"&MATCH($A2&B2,page2!$A $2:$A$9&page2!$D$2:$D$9,0)+2&":A9"),0)))

Copy right and down as needed.