SOLVED

Excel formula

%3CLINGO-SUB%20id%3D%22lingo-sub-3300857%22%20slang%3D%22en-US%22%3EExcel%20formula%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3300857%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20a%20total%20beginner%20with%20Excel.%20%26nbsp%3BI%20think%20this%20is%20a%20very%20simple%20function%20but%20I%20am%20not%20getting%20it.%20%26nbsp%3BI%20am%20trying%20to%20write%20a%20formula%20that%20if%20there%20is%20an%20X%20in%20one%20column%20then%20it%20has%20one%20value%20if%20not%20then%20nothing%20and%20if%20the%20next%20column%20has%20an%20X%20in%20it%20then%20it%20has%20another%20value%20with%20the%20next%20column%20with%20the%20amount.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-3300857%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3301886%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20formula%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3301886%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F570951%22%20target%3D%22_blank%22%3E%40mtarler%3C%2FA%3E%26nbsp%3BThank%20you%20for%20your%20help%20and%20explanation.%20%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3300998%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20formula%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3300998%22%20slang%3D%22en-US%22%3ESo%20the%20first%20concept%20to%20understand%20in%20Excel%20is%20that%20the%20formulas%20will%20display%20their%20result%20in%20that%20cell%20and%20that%20is%20it%20(i.e.%20they%20can%20not%20change%20or%20modify%20or%20move%20other%20cells%20or%20formats).%20So%20you%20are%20right%20on%20track.%20In%20the%20cell%20where%20you%20want%20the%20resulting%20value%20you%20type%20something%20like%3A%3CBR%20%2F%3E%3DIF(a1%3D%22X%22%20%2C%201%20%2C%20%22%22)%3CBR%20%2F%3EThis%20means%20IF%20the%20value%20in%20cell%20a1%20is%20%22X%22%20then%20show%20me%201%20and%20if%20NOT%20then%20show%20me%20blank%3CBR%20%2F%3Enext%2Falternatively%20you%20can%20return%20the%20value%20from%20a%20different%20cell%3A%3CBR%20%2F%3E%3DIF(a1%3D%22X%22%2C%20b1%2C%20%22%22)%3CBR%20%2F%3EIn%20this%20case%20if%20cell%20a1%20is%20X%20then%20it%20will%20return%20the%20value%20found%20in%20cell%20b1%20(otherwise%20show%20blank)%3CBR%20%2F%3EAnd%20you%20can%20start%20to%20'stack'%20these%20formulas%3A%3CBR%20%2F%3E%3DIF(a1%3D%22X%22%2C%201%20%2C%20IF(b1%3D%22X%22%2C%20c1%2C%20%22%22)%20)%3CBR%20%2F%3ENow%20it%20is%20getting%20a%20little%20more%20complicated%20but%20take%20it%201%20step%20at%20a%20time.%20IF%20the%20value%20in%20a1%20is%20X%20then%20show%20me%201%20but%20if%20not%20then%20do%20the%20next%20IF%20statement%20and%20check%20if%20the%20value%20in%20b1%20is%20X%20and%20if%20so%20then%20show%20me%20the%20value%20from%20c1%20and%20if%20not%20(i.e.%20neither%20a1%20nor%20b1%20have%20X)%20then%20show%20blank.%3CBR%20%2F%3EI%20hope%20this%20helps%20you%20understand%20how%20to%20do%20it%20or%20maybe%20at%20least%20how%20you%20might%20explain%20what%20you%20need%20a%20little%20more.%3C%2FLINGO-BODY%3E
New Contributor

I am a total beginner with Excel.  I think this is a very simple function but I am not getting it.  I am trying to write a formula that if there is an X in one column then it has one value if not then nothing and if the next column has an X in it then it has another value with the next column with the amount.

2 Replies
best response confirmed by Hans Vogelaar (MVP)
Solution
So the first concept to understand in Excel is that the formulas will display their result in that cell and that is it (i.e. they can not change or modify or move other cells or formats). So you are right on track. In the cell where you want the resulting value you type something like:
=IF(a1="X" , 1 , "")
This means IF the value in cell a1 is "X" then show me 1 and if NOT then show me blank
next/alternatively you can return the value from a different cell:
=IF(a1="X", b1, "")
In this case if cell a1 is X then it will return the value found in cell b1 (otherwise show blank)
And you can start to 'stack' these formulas:
=IF(a1="X", 1 , IF(b1="X", c1, "") )
Now it is getting a little more complicated but take it 1 step at a time. IF the value in a1 is X then show me 1 but if not then do the next IF statement and check if the value in b1 is X and if so then show me the value from c1 and if not (i.e. neither a1 nor b1 have X) then show blank.
I hope this helps you understand how to do it or maybe at least how you might explain what you need a little more.

@mtarler Thank you for your help and explanation.