Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Lookup arrayvalue in list
Hi, I have tried to look around on the net for this question, but i found no solutions straight away, so i figured i would ask the clever people here! I have two arrays C(j) and CP(i,j), in which country codes are stored in the first, and the corresponding values for the sector(i) and country(j) is stored in the second. I.e. sector i and country j would return example: "Some sector", C(j)= "USA",CI(i,j)= 13 % . Now i would like to match C(j) with a list stored in another array or a named range in a spreadsheet and if the country is part of the subregion, the percentage should sum into a variable Subregion1 f.x. I was thinking of using index(match), but i am not sure how. F.x somthing like: For i = 1 to NumberofSectors For j = 1 to NumberofCountries IF Index(match.....C(j).......Subregion)) = True' I dont know index formula sumsubregion = sumsubregion + CI(i,j) End IF Next i Will this work and can i use the index function? Thank you in advance! -- erikhs ------------------------------------------------------------------------ erikhs's Profile: http://www.excelforum.com/member.php...o&userid=32788 View this thread: http://www.excelforum.com/showthread...hreadid=565958 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
List Lookup Help | Excel Worksheet Functions | |||
LOOKUP/List Help | Excel Discussion (Misc queries) | |||
Join 2 Lists - Lookup value in 1 list & use result in 2nd lookup | Excel Worksheet Functions | |||
Lookup and list | Excel Discussion (Misc queries) | |||
Lookup List | Excel Programming |