You don't need to be an 'investor' to invest in Singletrack: 6 days left: 95% of target - Find out more
Struggling with an "IF" formula... Simple spreadsheet to calculate some selling rates. If the individual is "staff" then we use their salary * formula a. If they are "contractor" then we use salary * formula b.
Can i select which formula to use based on whether a cell contains the text "staff" or "contractor"?
i.e.
IF cell contains "contractor" then multiply by x; IF cell contains "staff" multiply by y
Ta!!
Yes
Edit: Use the [i]search[/i] function - http://office.microsoft.com/en-gb/excel-help/search-searchb-HP005209249.aspx?CTT=5&origin=HP005203209
if(isnumber(find(<cell>,"Staff")),<salary>*<y>,<salary>*<x>)))
Replacing the <> references with whatever cells you're looking at. Although as above, use Search if your data isn't in a particular case.
IF(cellref="Staff",salary*y,IF(cellref="Contractor",salary*x,"Error Message as they're not staff or contractor")
SEARCH seems complicated. Its just a standard IF function.
If the only two options for the type are "staff" or "contractor" then just us a single IF. If there are other otions you want to ignore the use 2 IFs.
e.g. if A2 contains the type of person and B2 contains the sallary then type.
=IF(A2="Staff",B2*[i]y[/i],B2*[i]x[/i])
of
=IF(A2="Staff",B2*[i]y[/i],IF(A2="Contractor",B2*[i]x[/i],NA()))
jfletch/IHN - ta - that's got it 😆
jfletch - Member
SEARCH seems complicated. Its just a standard IF function.
I was working on the basis that the cell contained more than just Staff or Contractor, i.e. some other text elsewhere
I was working on the basis that the cell contained more than just Staff or Contractor, i.e. some other text elsewhere
me too!
I was working on the basis that the cell contained more than just Staff or Contractor, i.e. some other text elsewhere
me too!
Seems you were making the problem more compilicated than it needed to be! 😉