Hi,
I made an excel file to help me buy stocks. So if I put the amount worth of stocks I want to buy and the at a certain price, excel should compute how much shares I should buy rounding down. Now, in my stockmarket, there are brackets of prices that allow you to buy in certain increments of shares of a stock. For example, if I buy a stock priced at 7, I can buy in increments of 100 shares. So if I buy 10,000 worth of stocks at 7, I can buy 1,400 shares.
This is the formula that I use, but it's not rounding down properly and when I input a different amount and price, nothing shows up. I have factored in the transaction charges in this formula. Do you know what's wrong with my formula?
=IF(OR(B2>=0.0001,B2<=0.0099),ROUNDDOWN(A2/(B2*1.00575),-6),IF(OR(B2>=0.01,B2<=0.049),ROUNDDOWN(A2/(B2*1.00575),-5),IF(OR(B2>=0.05,B2<=0.495),ROUNDDOWN(A2/(B2*1.00575),-4),IF(OR(B2>=0.5,B2<=4.99),ROUNDDOWN(A2/(B2*1.00575),-3),IF(OR(B2>=5,B2<=49.95),ROUNDDOWN(A2/(B2*1.00575),-2),IF(OR(B2>=50,B2<=999.5),ROUNDDOWN(A2/(B2*1.00575),-1),IF(B2>=1000,FLOOR(A2/(B2*1.00575),5))))))))
Kindly check the image for the excel file.
I made an excel file to help me buy stocks. So if I put the amount worth of stocks I want to buy and the at a certain price, excel should compute how much shares I should buy rounding down. Now, in my stockmarket, there are brackets of prices that allow you to buy in certain increments of shares of a stock. For example, if I buy a stock priced at 7, I can buy in increments of 100 shares. So if I buy 10,000 worth of stocks at 7, I can buy 1,400 shares.
This is the formula that I use, but it's not rounding down properly and when I input a different amount and price, nothing shows up. I have factored in the transaction charges in this formula. Do you know what's wrong with my formula?
=IF(OR(B2>=0.0001,B2<=0.0099),ROUNDDOWN(A2/(B2*1.00575),-6),IF(OR(B2>=0.01,B2<=0.049),ROUNDDOWN(A2/(B2*1.00575),-5),IF(OR(B2>=0.05,B2<=0.495),ROUNDDOWN(A2/(B2*1.00575),-4),IF(OR(B2>=0.5,B2<=4.99),ROUNDDOWN(A2/(B2*1.00575),-3),IF(OR(B2>=5,B2<=49.95),ROUNDDOWN(A2/(B2*1.00575),-2),IF(OR(B2>=50,B2<=999.5),ROUNDDOWN(A2/(B2*1.00575),-1),IF(B2>=1000,FLOOR(A2/(B2*1.00575),5))))))))
Legend: | |
Price | Shares |
0.0001-0.0099 | 1,000,000 |
0.010-0.049 | 100,000 |
0.05-0.249 | 10,000 |
0.25-0.495 | 10,000 |
0.50-4.99 | 1,000 |
5-9.99 | 100 |
10-19.98 | 100 |
20-49.95 | 100 |
50-99.95 | 10 |
100-199.90 | 10 |
200-499.80 | 10 |
500-999.50 | 10 |
1000-1,999 | 5 |
2,000-4,998 | 5 |
5,000-up | 5 |
Kindly check the image for the excel file.