Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Vlookup with If Statement
Folks,
I have the following scenario: My lookup table (Sheet 1) contains: A: Product # B: Total numbers of lbs. My main table (Sheet 2) [where the vlookup function resides] has the following: A: Product # B: # of Units So, let's say, in Column C (in Sheet 2) I am trying to write a vlookup formula that will look up Product # in Sheet 1 and return the Total number of lbs. I want to incorporate the additional formula where if it finds the lookup value then it divides the Total number of lbs. by the # of units. That's what I am looking for: Lookup A1 in Sheet1 A:B, return B but divide it by # of units. Hope this helps. Thanks . Regards, Shams. |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Vlookup with If Statement
Don't know why you have started a new thread, but this should do what
you want in C1 of Sheet 2: =VLOOKUP(A1,'Sheet1'!A:B,2,0)/B1 If there is a chance that the Product # in Sheet 2 is not present in Sheet 1, you might like to amend is as follows: =IF(ISNA(VLOOKUP(A1,'Sheet1'!A:B,2,0)),"",VLOOKUP( A1,'Sheet1'!A:B,2,0)/B1) Hope this helps. Pete Shams wrote: Folks, I have the following scenario: My lookup table (Sheet 1) contains: A: Product # B: Total numbers of lbs. My main table (Sheet 2) [where the vlookup function resides] has the following: A: Product # B: # of Units So, let's say, in Column C (in Sheet 2) I am trying to write a vlookup formula that will look up Product # in Sheet 1 and return the Total number of lbs. I want to incorporate the additional formula where if it finds the lookup value then it divides the Total number of lbs. by the # of units. That's what I am looking for: Lookup A1 in Sheet1 A:B, return B but divide it by # of units. Hope this helps. Thanks . Regards, Shams. |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Vlookup with If Statement
Pete,
Thanks for your reply. Your suggestion works just fine. A simple thing to conceptualize but somehow I closed my mind by trying to focus on an IF statement. "Shams" wrote: Folks, I have the following scenario: My lookup table (Sheet 1) contains: A: Product # B: Total numbers of lbs. My main table (Sheet 2) [where the vlookup function resides] has the following: A: Product # B: # of Units So, let's say, in Column C (in Sheet 2) I am trying to write a vlookup formula that will look up Product # in Sheet 1 and return the Total number of lbs. I want to incorporate the additional formula where if it finds the lookup value then it divides the Total number of lbs. by the # of units. That's what I am looking for: Lookup A1 in Sheet1 A:B, return B but divide it by # of units. Hope this helps. Thanks . Regards, Shams. |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Vlookup with If Statement
Glad it worked for you - thanks for feeding back.
Pete Shams wrote: Pete, Thanks for your reply. Your suggestion works just fine. A simple thing to conceptualize but somehow I closed my mind by trying to focus on an IF statement. "Shams" wrote: Folks, I have the following scenario: My lookup table (Sheet 1) contains: A: Product # B: Total numbers of lbs. My main table (Sheet 2) [where the vlookup function resides] has the following: A: Product # B: # of Units So, let's say, in Column C (in Sheet 2) I am trying to write a vlookup formula that will look up Product # in Sheet 1 and return the Total number of lbs. I want to incorporate the additional formula where if it finds the lookup value then it divides the Total number of lbs. by the # of units. That's what I am looking for: Lookup A1 in Sheet1 A:B, return B but divide it by # of units. Hope this helps. Thanks . Regards, Shams. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
If Statement with VLookup | Excel Worksheet Functions | |||
Nested IF statement with VLOOKUP | Excel Discussion (Misc queries) | |||
Vlookup 'And' statement | Excel Discussion (Misc queries) | |||
Vlookup or If statement Help | Excel Worksheet Functions | |||
Do I need a sumif or sum of a vlookup formula? | Excel Worksheet Functions |