CS1 Posted February 18, 2008 Share Posted February 18, 2008 (edited) I want my worksheet to complete the following In my cell I want the value of cell N3 to display if Cell M3 has the text "GS1a" entered in it and to display the value of O3 if the value is not the text GS1a. I have used the following equation which works in Excel =IF('M3'='GS1a','N3','03') However If I enter "GS1a" the cell says "True" and if I enter something else it says "Fale" not the values Im after. Edited February 18, 2008 by CS1 Quote Link to comment
Pat Stanford Posted February 18, 2008 Share Posted February 18, 2008 As you are rapidly learning, the VS Worksheet is not nearly as powerful as Excel. In this case though, the parser justs needs a liitle extra help. Try this: =if((M3='GS1a'),n3,o3) Note that only the string constant has quotes. The cell references should not. The extra help the parser needs is the extra set of parens around the logical test. One more hint for working with the worksheet. You are probably familiar with the fill down and fill right commands in Excel. They don't exist in WorkSheets. What give a similar functionality is to copy a cell (or set of cells) and then select an area before you paste. After the paste the selected are will be filled with the copied data. (Excel would give an error about the copy and paste areas not the same shape). Pat Quote Link to comment
CS1 Posted February 19, 2008 Author Share Posted February 19, 2008 Thanks Pat your a legend that works great, I think theres a bit to learn with worksheets. Another question for you: How would I create an equation similar to the previous one you created, that if GS1a is entered it displays (N3) but if GS2a is entered it displays (O3)? Quote Link to comment
CS1 Posted February 19, 2008 Author Share Posted February 19, 2008 In excel if i wanted to know the sum of a column I could use the equation =sum(A1:A30) and that would give me the total. This doesnt seem to work in the Worksheet. Is this information available in the help menu? Quote Link to comment
Pat Stanford Posted February 19, 2008 Share Posted February 19, 2008 I think you can reference up to seven levels deep of IF statements, so something like this (untested) =IF((M3='GS1a'),N3,IF((M3='GS2a'),03,'')) The final object is two single quotes to make the cell blank if M3 <> GS1a or GS2a. Pat Quote Link to comment
Pat Stanford Posted February 19, 2008 Share Posted February 19, 2008 Replace the colon with two periods. I determined this by typing in '=Sum(' and then dragging to select the range I wanted. =sum(A1..A30) Pat Quote Link to comment
CS1 Posted February 19, 2008 Author Share Posted February 19, 2008 (edited) That equation you typed in worked fine first pop, thanks for that. It will take some time to learn the differet techniques (IE .. instead of : ) Edited February 19, 2008 by CS1 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.