# Lookup data from different sheet

New to LibreCalc. Well aware that the question must have been asked before, but I’m probably not phrasing it correctly as cannot find the solution.

I have 2 sheets containing customer info. Each sheet has column customerID.

Sheet1 has all customers who have created an account. There are 60000 of them
Sheet2 has just 2 columns - customerID and total spend

There are about 50000 entries in Sheet2

All I’m trying to do is look up the customerID in Sheet 2 to match the customerID in Sheet1 and copy the total spend to the appropriate row in Sheet 1.

I know this can’t be that difficult, but I just can’t get it working.

Thanks for helping out a newbie

VLOOKUP is one tool you could use. [Edited link to more recent Help page]

If this answer helped you, please accept it by clicking the check mark to the left and, karma permitting, upvote it. That will help other people with the same question.

Thanks. I’m aware of the VLOOKUP but can’t seem to get my head round it. This is a simplified demo of what I’m trying to do

I want to insert the value of D into B when value of A equals the value of C.

So Col B Rows 2,3,5,6 and 9 should remain empty.

Using =VLOOKUP(A1,\$C:\$D,2) and copying down simply fills all rows…

• although it does at least show the change at the correct row as indicated. How do I omit the data in B2,3,5,6 and 9?

Many thanks.

Hi, using your example, try the following, =IFNA(INDEX(\$D\$1:\$D\$5,MATCH(A1,\$C\$1:\$C\$5,0),0)," ")
Let us know if it helps.