Hi all,
I have 9 samples in which a number of species were found, but the number and kind of species vary between samples. Now I'd like to create a pivot table to have an overview of which species was found where and the amount of individuals in each sample. In order to create this pivot table, I need to gather information from different tables.
Through applying filters I have made a column with every species found throughout the samples (unique values). Now I want to allocate the number of individuals of a certain species found in every sample to the corresponding row.
I've used the lookup formula:
=LOOKUP(A2;L$2:L$92;M$2:M$92)
with A the column with the unique values
L the column of a sample
M the number of individuals
This works only partly.
Until it comes across a match, it gives N/A, which is ok, but when the first match is found, it gives the number of individuals of that specific match until the next match, and repeats this 'behaviour' for every match it encounters.
How can I avoid this extrapolation of values?
Thanks in advance!
Last edited by furor; 07-06-2011 at 07:06 AM. Reason: solved
post a workbook
"Unless otherwise stated all my comments are directed at OP"
Mojito connoisseur and a dabbler in Cisco
where does code go ?
look here
how to insert code
how to enter array formula
why use -- in sumproduct
recommended reading
wiki Mojito
how to say no convincingly
most important thing you need
Martin Wilson: SPV
and RSMBC
Hi,
I've included a portion of my data. I've highlighted 3 matches in yellow and the (wrongly) extrapolated values in red. The latter should be zero, #N/A or similar.
Thanks
use
=INDEX($M$1:$M$36;MATCH(A2;$L$1:$L$36;0))
"Unless otherwise stated all my comments are directed at OP"
Mojito connoisseur and a dabbler in Cisco
where does code go ?
look here
how to insert code
how to enter array formula
why use -- in sumproduct
recommended reading
wiki Mojito
how to say no convincingly
most important thing you need
Martin Wilson: SPV
and RSMBC
This works fine, thanks!
If I may add another, somewhat related problem?
I want to get unique values from 2 joined columns and then retrieve the highest number when a species occurred in both columns.
Using lookup, this works when the numbers are arranged from low to high, but there are exceptions (highlighted). To overcome this, I tried to combine lookup with match and max functions, but it didn't work out.
Any ideas?
(this might address another problem: for some reason I have problems with Excel 2007 occasionally not executing functions, filters, ... the way it should be)
Anybody?![]()
try for max in e3 put
=MAX(($A$3:$A$79=D3)*($B$3:$C$79)) array entered with ctrl+shift+enter
"Unless otherwise stated all my comments are directed at OP"
Mojito connoisseur and a dabbler in Cisco
where does code go ?
look here
how to insert code
how to enter array formula
why use -- in sumproduct
recommended reading
wiki Mojito
how to say no convincingly
most important thing you need
Martin Wilson: SPV
and RSMBC
Super! Thanks!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks