Forum

Notifications
Clear all

Turning a word into an Action

5 Posts
4 Users
0 Reactions
111 Views
(@codemano8)
Posts: 2
New Member
Topic starter
 

Hello,

 

Is it possible to to use a word in a transition column ex. Buy or Sell and give it an action like plus or minus? So you can import data and figure out how many stock shares you have bought and sold?

 

to help figurer out quantity held and dollar cost average of stocks.

 

Thank you 

 
Posted : 16/08/2021 1:18 pm
Anders Sehlstedt
(@sehlsan)
Posts: 971
Prominent Member
 

Hello,

Yes, if the data is already imported you often use the IF function in a helper column to determine what to do.
It can also be handled during import, where you use Power Query to do the job.

Br,
Anders

 
Posted : 17/08/2021 4:27 am
(@codemano8)
Posts: 2
New Member
Topic starter
 

Hi Anders,

 

Would you happen to know what the formula would be for the helper column using the attached sheet? Im kind of new at this so I would have to even look up what a Power Query is.

 

Thank you 

 
Posted : 17/08/2021 4:38 pm
(@sunnykow)
Posts: 1417
Noble Member
 

Hi Cody

You can try this :

=IF([@[Transaction Type]]="Buy","+",IF([@[Transaction Type]]="Sell","-",""))

 

Sunny

 
Posted : 18/08/2021 1:07 am
(@jstewart)
Posts: 216
Estimable Member
 

If is one of the most useful functions in excel, you can learn more about it here.

 
Posted : 18/08/2021 9:55 am
Share: