Answer» I would like a way to do an if-condition (filter) based on a particular value in an excel sheet (2007). Consider the following sheet: my sheet
I would like every occurence of DELL and MOO to not be done 21% tax on. I would like them to be done 50% tax on, while leaving the TOTAL of DELL/MOO untouched. Only the second column (TAX 21%) should be calculated as 50% for DELL/MOO occurences. So this means:
DELL 100 50 121
Any ideas?
Thanks I figured it out.
syntax Excel if condition: if(condition;output_if_true;output_if_false)
e.g.:
=IF(B2="MOO";C2/100*50;C2/100*21)
For the last column I used:
=C2+(C2/100*21)
Treval That's really cool. I never knew that before! I'm GLAD you discovered this on your own, and I'm even happier that you shared this with us. Now, if someone has the same ISSUE, they can just do a forum search and find your post.Yep, the good ole IF-THEN-ELSE logic of an IF statement, very effective for such situations.
By the way, I'd like to know your technique to putting that spreadsheet on the web. Did you save the Excel in HTML format, and then upload it to a Google account? I went to docs.google.com logged in as my gmail account, then selected the option to PUBLISH my sheet as HTML. It then spits out a link where the sheet has been converted to HTML. Pretty much it.What do you guys think of this cool FUNCTION? =P
=VLOOKUP(max(wages);review2;2;FALSE)
It returns the highest number in a list of numbers called wages, looks it up in the range between 50 and Sally and returns the name that matches the max number. =) In other words: =VLOOKUP(max(listOfNumbers);listOfNumbersAndNames;whichColumnToDisplay;returnExactOrApproxResult)
the sheet
The downside is that VLOOKUP only looks up values in the left column.. forcing me to put the numbers on the left. I'll have to figure out a way to do this if the left column contains names (in other words, the sheet I showed, but vice versa).
Treval
|