Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Excel Experts:
My VBA skills allow me to delete columns, add numbers and such, but I don't know how to structure code to take different actions based on conditions. My spreadsheet is similar to the following: A B C 1 Existing Positions: 2 AMD 50 3 DELL 75 4 MSFT 100 5 New Trades: 6 Type Symbol Shares 7 ADD AMD 25 8 SELLPARTIAL DELL 50 9 SELLALL MSFT 100 I want my program to take a different action on an Existing Position, based on the Type of the New Trade. For the new trade in AMD, Type ADD, I want to add the 25 new shares to the existing 50 shares. For DELL, type SELLPARTIAL, I want to reduce the exising shares by 50. For MSFT, type SELLALL, I want to move the existing position to a different part of my spreadsheet. I think I want to use a Select Case structure, as I have 8 different Types. How would I structure the code? Thanks, Alan -- achidsey |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Calculating the distance customers live from a branch office | Excel Worksheet Functions | |||
Write a branch to another macro | Excel Worksheet Functions | |||
how do i create chart like branch-sector sales & collections | Excel Discussion (Misc queries) | |||
How can I contact branch Office in Tokyo, Japan? | New Users to Excel | |||
Establish a Branch of Clayton College here in Malaysia | Excel Worksheet Functions |