Excel VLOOKUP between two sheets failing

0 votes

I'm attempting to duplicate data from sheet 1's column E, "Cost," so that sheet 2's column A, "Code," matches column A, "Code," on sheet 1.

1
+--------+--------+---------------+---------+--------+
| A      | B      | C             | D       | E      |
+--------+--------+---------------+---------+--------+
| Code   | Name   | Description   | Price   | Cost   |
+--------+--------+---------------+---------+--------+
| AC33   | Prod 1 | Prod Desc 1   |  3.99   | 2.00   |
+--------+--------+---------------+---------+--------+
| AC34   | Prod 2 | Prod Desc 2   |  4.99   | 3.00   |
+--------+--------+---------------+---------+--------+
| AC35   | Prod 3 | Prod Desc 3   |  5.99   | 4.00   |
+--------+--------+---------------+---------+--------+

2

+--------+--------+---------------+---------+
| A      | B      | C             | D       |
+--------+--------+---------------+---------+
| Code   | Name   |Updated Price  | Cost    |
+--------+--------+---------------+---------+
| AC33   | Prod 1 |    16.99      |         | 
+--------+--------+---------------+---------+
| AC37   | Prod 2 |    18.99      |         |
+--------+--------+---------------+---------+
| AC38   | Prod 3 |    21.99      |         | 
+--------+--------+---------------+---------+

I tried using a VLOOKUP, but it's not working. Please help. Am I using Vlookup correctly?

I am bringing down this formula to sheet 2's column D.

=VLOOKUP(A2,'1'!$A$2:$A$811,5)

Dec 12, 2022 in Others by Kithuzzz
• 38,000 points
672 views

1 answer to this question.

0 votes

Try this:

=VLOOKUP(A2,'1'!$A$2:$E$811,5,0)

I altered "1"! $A$2:$A$811 to '1'! The table range you're using VLOOKUP on should contain both the column containing the lookup value and the column containing the result you desire to extract. $A$2:$E$811 In addition, I told VLOOKUP to use its last input, 0, to search for precise matches.

UPD:

As follows up from comments, the next formula works for OP:

=VLOOKUP(TRIM(A2),'1'!$A$2:$E$811,5,0)
answered Dec 13, 2022 by narikkadan
• 63,600 points

Related Questions In Others

0 votes
0 answers

How to compare two excel sheets

How to compare two excel sheets , ...READ MORE

Jul 18, 2021 in Others by Sri
• 3,190 points
809 views
0 votes
1 answer

Excel - count days between two dates per year

Put this in C2 and copy over: =MIN(DATE(C1,12,31),$B$2)-MAX(DATE(C ...READ MORE

answered Dec 29, 2022 in Others by narikkadan
• 63,600 points
512 views
0 votes
1 answer

Excel: Get text between two characters

Try this: =SUBSTITUTE(TEXTAFTER(A1:A4,"/",-1),"'","") Here is the output:  Similarly to get ...READ MORE

answered Feb 14, 2023 in Others by Kithuzzz
• 38,000 points
649 views
0 votes
1 answer

Count unique matches between two rows in Excel

The formula should be (in Excel 365) =SUM(--(COUNTIF(Draws!$B$2:$G$18,B2:K2)>0)) so ...READ MORE

answered Mar 27, 2023 in Others by narikkadan
• 63,600 points
556 views
0 votes
1 answer

Convert three letter country codes to full country names

Just create a list to be used in ...READ MORE

answered Oct 16, 2022 in Others by narikkadan
• 63,600 points
1,069 views
0 votes
1 answer

How to categorize/classify numbers from different ranges using Excel?

I wouldn't advise utilizing nested IFs because ...READ MORE

answered Oct 28, 2022 in Others by narikkadan
• 63,600 points
3,535 views
0 votes
1 answer

Using VLOOKUP()

Vlookup takes the lookup value first, so ...READ MORE

answered Nov 5, 2022 in Others by narikkadan
• 63,600 points
515 views
0 votes
1 answer
0 votes
1 answer

Using Excel VLOOKUP() function across two sheets

The syntax for VLOOKUP is VLOOKUP(Lookup_Value,Table Array,Col_index_num,Range_lookup) OR, to start in ...READ MORE

answered Sep 30, 2022 in Others by narikkadan
• 63,600 points
988 views
0 votes
1 answer

Excel: How to merge two columns into one (from different sheets or separated columns)

This equation is completely adjustable. Your two ...READ MORE

answered Oct 7, 2022 in Others by narikkadan
• 63,600 points
864 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP