Try INDIRECT. Does this little example provide a sufficient hint?

=SUM(INDIRECT(CONCATENATE(D4; ":";E4)))

On 07/22/2010 06:05 AM, Ian Coetzee wrote:
Hi all

I have tried googling and going through all the functions I could find, but I cant for the love of me find a way to do this.

I have a few dataranges (+- 10) that I am doing vlookups on.

The format of the dataranges are as follows:

Company1
{
_Company 1_
Account1 \t <Data>
Account2 \t <Data>
...
Account<n> \t <Data>
}

Company2
{
_Company 2_
Account1 \t <Data>
Account2 \t <Data>
...
Account<n> \t <Data>
}
........
........
........
Company<n>
{
_Company <n>_
Account1 \t <Data>
Account2 \t <Data>
...
Account<n> \t <Data>
}

I need to display that data as follows

| _Company 1_ | _Company 2_ | _Company <n>_ | Account1 |=Vlookup($A1,Company1,2,0) |=Vlookup($A1,Company2,2,0) |=Vlookup($A1,Company<n>,2,0) | Account2 |=Vlookup($A2,Company1,2,0) |=Vlookup($A2,Company2,2,0) |=Vlookup($A2,Company<n>,2,0) |
...
Account<n>|=Vlookup($A<n>,Company1,2,0)|=Vlookup($A<n>,Company2,2,0) |=Vlookup($A<n>,Company<n>,2,0)|

Does any of you know how I will be able to make my Vlookup use the cell (B1,C1,etc) to define which datarange to use?

Hope anybody understands this post (I know I almost confused myself here)

Regards
Ian

--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to