Words to function

Copper Contributor
Hello could you please help me with an excel question about how to take a cell with a word and make that word in the cell an action. Example the word buy or sell make it a plus or a subtraction so I can figure out the book value of my holdings?
6 Replies

@Cody_Lees You haven't really explained how your data / transactions table looks like, but perhaps the formula shown in the picture below is something you could use. If not, come back here and upload an example of your file (the real structure with some fake data).

 

Since you tagged your post "Office365", it should work for you. It merely demonstrates a way to interpret a numbers in column C as positives or negatives, based on a word in column B.

Screenshot 2021-07-11 at 07.34.08.png

@Riny_van_Eekelen 

Here is the test data. Would I have to make a different column for the equation or could I over lay the  function to transaction Colum with out taking out the words?

 

Cody_Lees_0-1626025156874.png

 

@Cody_Lees You uploaded a picture, not a file. What do you mean by "could I over lay the  function to transaction column with out taking out the words?"

 

You original question was "how to take a cell with a word and make that word in the cell an action?". Not really sure what you want.

@Riny_van_Eekelen 

 

Sorry this is a bit new for me. Ok! So im trying to take data of present and  future transactions that will come from a stock brokerage in this format that is attached. I want to figure out what my book value is and how many shares I have currently but the info comes in a word format buy and sell not plus and minus... also dividend and reinvested. So if I could take the word and give it a corresponding action to a different cell in the quantity column then I could figure out the total shares held.

@Cody_Lees Thanks for this. The plus/minus seems to be in the Amount column, so what is it that you want to calculate? All the Buy and Reinvest amounts are negative. All others are zero or positive.

Do you have an email I can send you the full sheet to get a better understanding?