View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Riccardinho Riccardinho is offline
external usenet poster
 
Posts: 1
Default Macro to translate values based upon data in another worksheet?


I have a requirement to copy records from one worksheet to another
transposing certain cells in each row into new values based upon th
values in another worksheet.

For example, Sheet 1 contains the following sample values:

CONTACT ID AREA OF INTEREST
1 Football - UK
2 Cricket - India
3 Sport - UK
4 Sport - Europe


Sheet 2 contains a list of the translation values, a la

SOURCE AREA OF INTEREST DESTINATION AREA DESTINATION SPORT
Football - UK UK Football
Cricket - India India Cricket

What I need in Sheet 3 is a denormalised list of records, eg...

CONTACT ID DESTINATION AREA DESTINATION SPORT
1 UK Football
2 India Cricket



However... the situation is complicated by the fact that certain sourc
data transposes to multiple destination data, and I need to create a ne
row for each. So the translation for Sport - UK is

SOURCE AREA OF INTEREST DESTINATION AREA 1 DESTINATION SPOR
1 DESTINATION AREA 2 DESTINATION SPORT 2
Sport - UK UK Football UK Cricket

up to 3 different translations. For this I would need to create i
Sheet 3 the following records:

CONTACT ID DESTINATION AREA DESTINATION SPORT
3 UK Football
3 UK Cricket
and for record 4
4 UK Football
4 UK Cricket
4 Holland Football
4 Holland Cricket

etc etc.


I can get the rows copied to Sheet 3 easily enough, but am strugglin
with the translations and multiple record creations. Any help would b
greatly appreciated

--
Riccardinh
-----------------------------------------------------------------------
Riccardinho's Profile: http://www.excelforum.com/member.php...fo&userid=2478
View this thread: http://www.excelforum.com/showthread.php?threadid=38347