Modify Vlookup

C

Charles

Hi,
I need some help in modifying a vlookup formula the following code
works however I need to modify it so that when the cell in "Like
Store" (B2) is blank the code will place the cell value of Rounded of
"3886" in place of the #N/A.



VLOOKUP(B2,A$2:C655,3,FALSE) This is in the column for "Final
Weighting"


Store Like Store Weighting Weighting % Reduction Weighting - %
Rounded Final Weighting
1001 1006 39142
10 35227.8 35228 39414
1002 1001 36606
10 32945.4 32946 39142
1003 38858
90 3885.8 3886 #N/A
 
C

Charles

=if(b2="","what does rounded of 3886 mean?",vlookup(....))

Hi,

Thanks for the response. it looks like the format of the worksheet did
not carry over in the post.
The "3886 is the value I want to replace the N/A with.
The worksheet format starts in column A thru G.
In column G i have the Vlookup code VLOOKUP(B2,A$2:C655,3,FALSE) .
This work fine, but now I would like to for it to say if the cell
value in column B is "" to instead of putting "#N/A" In Column G it
will Put the value of column F which will be in the same row as the
blank cell in column B.
 
R

Rick Rothstein

Put this formula in G2 and copy it down...

=IF(B2="",F2,VLOOKUP(B2,A$2:C655,3,FALSE))

This is the same formula that Dave posted with your VLOOKUP function call
substituted in and F2 replacing the question he asked in the second argument
to the IF function.

--
Rick (MVP - Excel)


=if(b2="","what does rounded of 3886 mean?",vlookup(....))

Hi,

Thanks for the response. it looks like the format of the worksheet did
not carry over in the post.
The "3886 is the value I want to replace the N/A with.
The worksheet format starts in column A thru G.
In column G i have the Vlookup code VLOOKUP(B2,A$2:C655,3,FALSE) .
This work fine, but now I would like to for it to say if the cell
value in column B is "" to instead of putting "#N/A" In Column G it
will Put the value of column F which will be in the same row as the
blank cell in column B.
 
R

Rick Rothstein

Actually, I kind of think the ending row of your lookup range should be
absolute like the beginning row is...

=IF(B2="",F2,VLOOKUP(B2,A$2:C$655,3,FALSE))
 
C

Charles

Put this formula in G2 and copy it down...

=IF(B2="",F2,VLOOKUP(B2,A$2:C655,3,FALSE))

This is the same formula that Dave posted with your VLOOKUP function call
substituted in and F2 replacing the question he asked in the second argument
to the IF function.

--
Rick (MVP - Excel)





Hi,

Thanks for the response. it looks like the format of the worksheet did
not carry over in the post.
The "3886 is the value I want to replace the N/A with.
The worksheet format starts in column A thru G.
In column G i have the Vlookup code  VLOOKUP(B2,A$2:C655,3,FALSE) .
This work fine, but now I would like to for it to say if the cell
value in column B is "" to instead of putting  "#N/A" In Column G it
will Put the value of column F which will be in the same row as the
blank cell in column B.

Rick,

Thanks for the code it works.
Also thanks to all who responded to my request.
 

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

Similar Threads


Top