Transferring data from column to another without VLOOKUP

G

goodpunk6

Ok, so this is going to be a bit difficult to explain, AND I'm a newbie to
functions.

I've got one spreadsheet with an array of data that looks like this.

spreadsheet A

CL 45,000
CH 300
DE 8,884

As you can guess, the letters are in one column and the numbers in another.

spreadsheet B

BB 0
BZ 0
CL 0
CM 0
CN 0
DA 0
DE 0

So what I would like to do is copy the info from spreadsheet A to
spreadsheet B. I know that VLOOKUP can do this for me but generates an error
in spreadsheet B for every letter code that isn't in spreadsheet A. I'm
trying to avoid this and have the number values appear for letter codes in
spreadsheet B that are in spreadsheet A and a 0 for letter codes that aren't
in spreadsheet A.

Can anybody help?
 
D

Dave

Hi GP6,
You can still use the VLOOKUP function. You just have to include an error
trap.
For example:
IF(ISERROR(Your VLOOKUP formula),0,Your Lookup Formula)
This will result in 0 (zero) if the VLOOKUP wants to return an error.
If the VLOOKUP result is ok, then its result is displayed.
Regards - Dave
 
S

sb1920alk

Another way is SUMPRODUCT:

=SUMPRODUCT(--('Spreadsheet A'!$A$1:$A$3=A1),'Spreadsheet A'!$B$1:$B$3)
 
G

goodpunk6

Anyway to make this more "click friendly?"

sb1920alk said:
Another way is SUMPRODUCT:

=SUMPRODUCT(--('Spreadsheet A'!$A$1:$A$3=A1),'Spreadsheet A'!$B$1:$B$3)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top