On 04/16/2009 02:34 PM, DDowney wrote: > Hi > > Is it possible to use text cells in if/else statements in Calc? Im using > Calc to do a household budget spreadsheet & am including a sheet which > will track and chart all electricity bills, for instance, through the > year. Can you have an If statement that says, for Januarys sheet, if > A1=Electricity then print the value in B1? Ive tried something along the > lines of =IF($Jan.A1='Electricity';$Jan.B1;0) but it hasn't worked. > > Anyone got any suggestions? > > Thanks > > Dermot
Perhaps double quotes? From Help: IF Specifies a logical test to be performed. Syntax IF(Test; ThenValue; "OtherwiseValue") Test is any value or expression that can be TRUE or FALSE. ThenValue (optional) is the value that is returned if the logical test is TRUE. OtherwiseValue (optional) is the value that is returned if the logical test is FALSE. In the OpenOffice.org Calc functions, parameters marked as "optional" can be left out only when no parameter follows. For example, in a function with four parameters, where the last two parameters are marked as "optional", you can leave out parameter 4 or parameters 3 and 4, but you cannot leave out parameter 3 alone. Examples =IF(A1>5;100;"too small") If the value in A1 is higher than 5, the value 100 is entered in the current cell; otherwise, the text “too small” (without quotes) is entered. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
