IF
Function Question


Excel 2007  Excel 2003  Macros Excel 2007  Macros Excel 2003  Excel 2010 


Home  

The
question
below was asked by some users on Facebook, Twitter or Yahoo! Answers: "Excel 'if' question? What formula? I'm wondering what formula I would need to use on Microsoft excel. Basically depending on the size of a room, it would be S (small), M (Medium) or L (Large). Less then 6.5m = S 6.5 to 11.5m = M 11.5 or larger = L What formula would I need to enter in order for Excel to automatically decide if the size of the room is S, M or L? Thanks" Solution: Using the IF Function =IF(A2<6.5, "S", IF(A2<11.5, "M", "L")) Or =IF(A2<6.5,"S",IF(A2<11.5,"M","L")) Using the Lookup Function =IF(A2="","", LOOKUP(A2,{0,6.5,11.5;"S","M","L"})) In the lookup formula the first part checks whether the cell A2 has any data at all and then proceeds further. Using Vlookup (most versatile) =Vlookup(A2, mydata, 2) 'mydata' is the named range. Watch the MSExcel training video below to see how the solution is found using IF, lookup and vlookup functions. 



Home  
Excel 2007  Excel 2003  Macros Excel 2007  Macros Excel 2003  Excel 2010 
