Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Macro Help
Ok first I am new at this and I hope this is how I am supposed to do this. Ok I am trying to work with macros but have never used them before. I need to create a macro that will put a value from one cell into another. Here is a little background on what I am doing.... I have created a spreadsheet for a football pool with the names of the people in the boxes. I have two cells at the top for the current score so I can see who is currently winning the pool. The pool is paying each quarter, and so what I want is a way to put the current score in each quarters own cells and it will list the winner and keep that info and then at the next quarter click another button and do the same. I already have a place for everything to go I just need to know how to create a macro for the four buttons (one for each quarter) to take whatever score i have in the cells at the top and put them into the corresponding cells below that will keep that info and when i click the next button it will do the same except put it into the next quarters section. any help would be appreciated. Thanks -- bm8211520 ------------------------------------------------------------------------ bm8211520's Profile: http://www.officehelp.in/member.php?userid=6307 View this thread: http://www.officehelp.in/showthread.php?t=1337463 Posted from - http://www.officehelp.in |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Macro Help
I guess i expected to get an answer quickly hmm might have to forget it people can email me with any suggestions if the know what i am needing to do bm8211520 AT yahoo DOT com thanks -- bm8211520 ------------------------------------------------------------------------ bm8211520's Profile: http://www.officehelp.in/member.php?userid=6307 View this thread: http://www.officehelp.in/showthread.php?t=1337463 Posted from - http://www.officehelp.in |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Macro Help
You could use something like
Public Sub Test() Const TOP_SCORE As String = "C2" '<=== cell to capture current top score Const NEXT_SCORE As String = "D2" '<=== cell to capture current next top score Const TARGET_COLUMN As String = "M" '<=== column to store quarterly data Dim iLastRow As Long With ActiveSheet iLastRow = .Cells(.Rows.Count, TARGET_COLUMN).End(xlUp).Row If iLastRow 1 Or .Cells(1, TARGET_COLUMN).Value < "" Then iLastRow = iLastRow + 1 End If .Cells(iLastRow, TARGET_COLUMN).Value = _ .Range(TOP_SCORE).Value .Cells(iLastRow, TARGET_COLUMN).Offset(0, 1).Value = _ .Range(NEXT_SCORE).Value End With End Sub Tune it to suit. -- HTH Bob Phillips (there's no email, no snail mail, but somewhere should be gmail in my addy) "bm8211520" wrote in message ... Ok first I am new at this and I hope this is how I am supposed to do this. Ok I am trying to work with macros but have never used them before. I need to create a macro that will put a value from one cell into another. Here is a little background on what I am doing.... I have created a spreadsheet for a football pool with the names of the people in the boxes. I have two cells at the top for the current score so I can see who is currently winning the pool. The pool is paying each quarter, and so what I want is a way to put the current score in each quarters own cells and it will list the winner and keep that info and then at the next quarter click another button and do the same. I already have a place for everything to go I just need to know how to create a macro for the four buttons (one for each quarter) to take whatever score i have in the cells at the top and put them into the corresponding cells below that will keep that info and when i click the next button it will do the same except put it into the next quarters section. any help would be appreciated. Thanks -- bm8211520 ------------------------------------------------------------------------ bm8211520's Profile: http://www.officehelp.in/member.php?userid=6307 View this thread: http://www.officehelp.in/showthread.php?t=1337463 Posted from - http://www.officehelp.in |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
error when running cut & paste macro | Excel Worksheet Functions | |||
Compiling macro based on cell values | Excel Discussion (Misc queries) | |||
Search, Copy, Paste Macro in Excel | Excel Worksheet Functions | |||
Closing File Error | Excel Discussion (Misc queries) | |||
Highlight Range - wrong macro, please edit. | Excel Worksheet Functions |