Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IF function in Excel

Status
Not open for further replies.

kabushnell

Technical User
Jun 4, 2003
81
0
0
US
I have a row of data that I want to use the IF function to return another value. There are two sets of data.

One has Sold with a price and date following, the other has Purchased with a price and date.

What I would like to do is have the formula look at the cell and return B if it was a purchase and S if it was sold.

Any ideas? I tried the IF function but with the different prices and dates I can't make it work.
 
Let's say A1 has your data. Wouldn't =IF(A1=Sale,"S","B") suffice?
 
that is what I had but it does not work. The reference sell contains more than just "sold" or "purchased". It contains something like Sold 4/14/02 145.67, etc.
 
=IF(LEFT(A1,4)="Sold","S","B")
 
=IF((FIND("sold",A1))>=1,"S","B")

try this.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top