#1   Report Post  
Posted to microsoft.public.excel.misc
Tommy
 
Posts: n/a
Default Formula question

Three columns:

b 1250 1253

s 1250 1253

If column a equals "b" for buy, I want to subtract column b from
column c. If column a equals "s" for sell, then I want to subtract
column c from column b.

I'm looking for a formula in column d that will get the desired
results.

Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave O
 
Posts: n/a
Default Formula question

If column A will contain ONLY a B or an S, you can write this IF
function:
=IF(A1="b",C1-B1,B1-C1)

  #3   Report Post  
Posted to microsoft.public.excel.misc
bpeltzer
 
Posts: n/a
Default Formula question

If your data begins in row 2, then in D2:
if(a2="b",c2-b2,if(a2="s",b2-c2,"?")). Autofill that formula through each
row in column D. If you're confident that ONLY b or s will appear in column
A, you could make this =(c2-b2)*if(a2="b",1,-1).

"Tommy" wrote:

Three columns:

b 1250 1253

s 1250 1253

If column a equals "b" for buy, I want to subtract column b from
column c. If column a equals "s" for sell, then I want to subtract
column c from column b.

I'm looking for a formula in column d that will get the desired
results.

Thanks.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formula Question Marcus Feldmore Excel Worksheet Functions 1 November 11th 05 03:47 PM
Formula question Dawn Excel Discussion (Misc queries) 1 November 8th 05 06:56 PM
I have a question regarding countif formula. Fahad Farid Ansari Excel Worksheet Functions 6 October 1st 05 11:57 PM
An Excel Formula Question JWCardington Excel Worksheet Functions 6 September 24th 05 09:00 PM
Formula Question HTC Excel Discussion (Misc queries) 5 September 22nd 05 04:59 PM


All times are GMT +1. The time now is 04:01 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"