kumarkumar Posted May 5, 2007 Share Posted May 5, 2007 I would like to assign a numerical value to a text in Excel.For example I have 3 columns with values in them as 2, OUT, 3.Now what I want is to assign a numerical value to OUT (say OUT=5) so that when I sum all the three columns it gives me 10 and not the usual "#VALUE!"Is this possible at all?? If so then how to do it?? Link to comment Share on other sites More sharing options...
jaclaz Posted May 6, 2007 Share Posted May 6, 2007 Well, you cannot assign a number to a text, but you can use the text to determine a value in the cell where you are now putting the "SUM()" function.Can you better explain the layout of your excel spreadsheet?I mean you don't have 3 columns with values in them as 2, OUT, 3.you can have three cells in adjoining columns with tbose values.Supposing you have:A1 -> 2B1 -> OUTC1 -> 3the formula in D1, INSTEAD of =SUM(A1:C1) could be:=A1+C1+IF(B1="OUT",5,0)If you have several different strings to give a value to, you can make a table for them, say you have just two values, "OUT" and "IN" in another place of the same worksheet (in this example, but it can be on another sheet as well) you put (say):E1 -> INE2 -> OUTF1 -> 10F2 ->5the formula in D1, INSTEAD of =A1+C1+IF(B1="OUT",5,0) could be:=A1+C1+VLOOKUP(B1;$E$1:$F$2;2;0)jaclaz Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now