Conversation Re: I think I need a If Then formula in Excel
https://techcommunity.microsoft.com/t5/excel/i-think-i-need-a-if-then-formula/m-p/309158#M36113
<P>Hi, Assuming I understand you correctly.</P><P> </P><P>=VLOOKUP($C$1,$A$1:$B$100,2,FALSE)</P>Fri, 04 Jan 2019 21:07:58 GMTJWR11382019-01-04T21:07:58ZI think I need a If Then formula
https://techcommunity.microsoft.com/t5/excel/i-think-i-need-a-if-then-formula/m-p/309157#M36112
<P>Hello, and thank you for looking. I can't search because my description is moderately vague. I want a formula that looks to see if a cell matches a value in a column and would then pull a value from another corresponding column.</P><P> </P><P>i.e. there are a list of 100 numbers in column A and B. I want it to look at the number I enter in C1 and if it finds that number in column A, it shows the corresponding number in column B. So if I enter 60 in C1, it would search column A for 60 ,and let's say it finds it in A30 it would then show the number in B30.</P><P> </P><P>My explanation is really convoluted, so please let me know if anyone can help, or needs more clarification.</P>Fri, 12 Jul 2019 18:18:56 GMThttps://techcommunity.microsoft.com/t5/excel/i-think-i-need-a-if-then-formula/m-p/309157#M36112shawndwyer2019-07-12T18:18:56ZRe: I think I need a If Then formula
https://techcommunity.microsoft.com/t5/excel/i-think-i-need-a-if-then-formula/m-p/309158#M36113
<P>Hi, Assuming I understand you correctly.</P><P> </P><P>=VLOOKUP($C$1,$A$1:$B$100,2,FALSE)</P>Fri, 04 Jan 2019 21:07:58 GMThttps://techcommunity.microsoft.com/t5/excel/i-think-i-need-a-if-then-formula/m-p/309158#M36113JWR11382019-01-04T21:07:58ZRe: I think I need a If Then formula
https://techcommunity.microsoft.com/t5/excel/i-think-i-need-a-if-then-formula/m-p/309681#M36114
<P>That did exactly it. Thank you so much! Could you explain how you set that up, or point me to a link where I can learn it? That will be incredibly useful for a few things I have coming up, so I would like to understand it rather than just cut and paste. </P>Mon, 07 Jan 2019 12:47:32 GMThttps://techcommunity.microsoft.com/t5/excel/i-think-i-need-a-if-then-formula/m-p/309681#M36114shawndwyer2019-01-07T12:47:32ZRe: I think I need a If Then formula
https://techcommunity.microsoft.com/t5/excel/i-think-i-need-a-if-then-formula/m-p/309873#M36115
<P>Your welcome. Sure.</P><P> </P><P>The syntax for Vlookup is Vlookup('Value to Search For','Range to Search In','Column Number to Return Values From','True/False'). Each of the parameters that we are inputting into the function is called an argument (Ie. this function has 4 arguments)</P><P> </P><P>In your case we are searching for the value in C1, so C1 is our first argument for the function (Do you understand absolute vs. relative cell references? That's what the dollar signs are for, If we'd written <SPAN>=VLOOKUP(C1,A1:B100,2,FALSE) and copied the formula down to the next row it would change to =VLOOKUP(C2,A2:B101,2,FALSE), by using the $ we lock the formula and it would remain the same as we copy down (Or across), If you had a value in C2, C3, etc that you wanted to lookup and wanted to be able to copy the formula down than we could remove the $ from the C1 reference (So =VLOOKUP(C1,$A$1:$B$100,2,FALSE), would then read =VLOOKUP(C2,$A$1:$B$100,2,false) when copied down to the next row. Google absolute vs. relative cell references for more reading on this, very handy when you are copying a formula across multiple cells.)</SPAN></P><P> </P><P><SPAN>The next argument is the range we want to search in including the range we want to return values from (A1:B100 in this case, if the value we wanted to return was in column C, then it would be A1:C100), alternately you could search the entire row (so A:B for the second argument) as opposed to limiting this to row 1 to 100.</SPAN></P><P> </P><P><SPAN>The 3rd argument is the column number that we want to return values from, B being the 2nd column in the range that is our 2nd argument (A1:B100). The first argument (C1) will always be searched for in the first column of the range that is the 2nd argument (A1:B100), Vlookup can only go from left to right (Ie. we couldn't search for a value in B and return a value in A).</SPAN></P><P> </P><P><SPAN>The final argument simply indicates whether a partial match would be returned (False means exact match, True means partial match), typically a partial match would only be used if our data was sorted. </SPAN></P><P> </P><P><SPAN>Does that help at all?</SPAN></P><P> </P><P> </P><P> </P><P> </P>Mon, 07 Jan 2019 18:35:21 GMThttps://techcommunity.microsoft.com/t5/excel/i-think-i-need-a-if-then-formula/m-p/309873#M36115JWR11382019-01-07T18:35:21ZRe: I think I need a If Then formula
https://techcommunity.microsoft.com/t5/excel/i-think-i-need-a-if-then-formula/m-p/310265#M36116
<P>That is amazing. You are a giant among mortals! Thank you for all your help, and taking the time for the detailed explanation. I am much more capable now thanks to your assistance.</P>Tue, 08 Jan 2019 14:55:44 GMThttps://techcommunity.microsoft.com/t5/excel/i-think-i-need-a-if-then-formula/m-p/310265#M36116shawndwyer2019-01-08T14:55:44ZRe: I think I need a If Then formula
https://techcommunity.microsoft.com/t5/excel/i-think-i-need-a-if-then-formula/m-p/310340#M36117
<P>Your welcome. Don't hesitate to send me a message if you need a hand with anything else.</P>Tue, 08 Jan 2019 16:40:44 GMThttps://techcommunity.microsoft.com/t5/excel/i-think-i-need-a-if-then-formula/m-p/310340#M36117JWR11382019-01-08T16:40:44Z