Below is a rough template of the sheet I'm using. I want to define the symbols in the code and associate a commission value to them (i.e. ABC = .05, DEF = .06). In the Gained/Lossed column I want to product of the commission * shares to be populated. some symbols have a minimum value (i.e. $50) while others have no minimum. Also, if $100 or over, data must be populated in Gained, and anything less than $100 must be lost.
I want the code to look in the Symbol column, then match the symbol to the commission value defined in the code, and output the total. If the symbol on the sheet isn't defined in the code I would want an error to be output on the sheet.
I've got a general understanding of IF-Then statements and general BASIC programming, but can't figure out how to define the commission rates and get an error to output.
Any help is greatly appreciated!
Mike
I want the code to look in the Symbol column, then match the symbol to the commission value defined in the code, and output the total. If the symbol on the sheet isn't defined in the code I would want an error to be output on the sheet.
I've got a general understanding of IF-Then statements and general BASIC programming, but can't figure out how to define the commission rates and get an error to output.
Any help is greatly appreciated!
Mike
temp sheet.xls | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | |||
1 | 9/27/02 | |||||||||||
2 | ||||||||||||
3 | A/CNAME | A/C# | B/S | SYM | SHS | PRICE | DATE | ORDER# | Gained | Lost | ||
4 | Smith | SELL | ABC | 10000 | $500.00 | $0.00 | ||||||
5 | Smith | SELL | ABC | 200 | $0.00 | $10.00 | ||||||
6 | Doe | BUY | DEF | 5000 | $300.00 | $0.00 | ||||||
7 | Doe | BUY | DEF | 100 | $0.00 | $50.00 | ||||||
Sheet1 |