PDA

View Full Version : Solved: Getting data from other sheet with if statement and somprodukt



MPDK166
04-08-2011, 12:36 AM
LS,

I want to get data from a other sheet then the main sheet when there is a match between two variables (main sheet and sub sheet).

Currently i have got this formula, but how to continue?

=IF(SOMPRODUKT(--(VC!A1:A100=Voorblad!B2))=1;?????????;0)

I want to get data from row of the VC! sheet column B when the result of the match is 1.

e.g.

When Voorblad!B2 matches VC!A35 then I want to get the data from VC!B35.

Bob Phillips
04-08-2011, 01:37 AM
Whilst I would use COUNTIF not SUMPRODUCT, what is wrong with that formula?

MPDK166
04-08-2011, 01:47 AM
The formula is not wrong, however, I don't know what to fill in at the question marks!

Bob Phillips
04-08-2011, 01:52 AM
So are you saying that you want to look up the cell that matches a particular value, and then get the cell next to it? If so, to the left or the right, offset how many columns?

MPDK166
04-08-2011, 01:56 AM
That is correct!

If my value in main sheet B2 matches a value in Column A (sub sheet) then I want the value of the cell next (or 3 cells to the right (or 2 cells to the right + 4 cells to the right)) to the match of B2 and row of Column A.

BTW the offset differs everytime, because i going to use this formula in multiple cells...

Bob Phillips
04-08-2011, 02:34 AM
I suggest that you check out VLOOKUP (VERT.ZOEKEN) in Excel help, it does what you want.

MPDK166
04-08-2011, 06:04 AM
I solved my challenge with Vlookup!

Thanks