Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I created a macro to gather a short list of data items for some numbers that
are in 3 different spreadsheets (all identical, just a different series of numbers on each). I started the macro by telling it to go to a hard location in the first spreadsheet (where the list of numbers starts), then end-arrow down to the last number, then over to the next column where I have a vlookup function. Each day, the list on each spreadsheet may be shorter or longer, depending on which numbers are chosen. My macro unfortunately uses the same quantity of numbers on each spreadsheet each time, remembering the number of rows down when first created. How can I alter it so that it knows to stop at the last number in the list, regardless of how many are in the list, and be able to do it again when the list becomes shorter or longer? -- Richard Champlin Administrative Program Assistant II Children''''''''s Hospital & Regional Medical Center, Seattle |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Post your code...
-- HTH... Jim Thomlinson "Richard Champlin" wrote: I created a macro to gather a short list of data items for some numbers that are in 3 different spreadsheets (all identical, just a different series of numbers on each). I started the macro by telling it to go to a hard location in the first spreadsheet (where the list of numbers starts), then end-arrow down to the last number, then over to the next column where I have a vlookup function. Each day, the list on each spreadsheet may be shorter or longer, depending on which numbers are chosen. My macro unfortunately uses the same quantity of numbers on each spreadsheet each time, remembering the number of rows down when first created. How can I alter it so that it knows to stop at the last number in the list, regardless of how many are in the list, and be able to do it again when the list becomes shorter or longer? -- Richard Champlin Administrative Program Assistant II Children''''''''s Hospital & Regional Medical Center, Seattle |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
'
Range("B2").Select Application.Goto Reference:="R3C16" Selection.End(xlDown).Select Selection.End(xlDown).Select Selection.End(xlUp).Select Range("Q12").Select Range(Selection, Selection.End(xlUp)).Select Selection.Copy Windows("Book1").Activate Range("A1").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Application.CutCopyMode = False Selection.End(xlDown).Select Range("A11").Select Windows("Cost Listing.xls").Activate ActiveSheet.Next.Select Range("B2").Select Application.Goto Reference:="R3C16" Range("P4").Select Selection.End(xlDown).Select Selection.End(xlDown).Select Selection.End(xlUp).Select Range("Q10").Select Range(Selection, Selection.End(xlUp)).Select Selection.Copy Windows("Book1").Activate Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Application.CutCopyMode = False Selection.End(xlDown).Select Range("A19").Select Windows("Cost Listing.xls").Activate ActiveSheet.Next.Select Range("B2").Select Application.Goto Reference:="R3C16" Selection.End(xlDown).Select Selection.End(xlDown).Select Selection.End(xlUp).Select Range("Q4").Select Range(Selection, Selection.End(xlUp)).Select Selection.Copy Windows("Book1").Activate Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Application.CutCopyMode = False Range("A1:A20").Select Selection.Style = "Currency" Selection.NumberFormat = "$#,##0.00_);[Red]($#,##0.00)" End Sub -- Richard Champlin Administrative Program Assistant II Children''''''''s Hospital & Regional Medical Center, Seattle "Jim Thomlinson" wrote: Post your code... -- HTH... Jim Thomlinson "Richard Champlin" wrote: I created a macro to gather a short list of data items for some numbers that are in 3 different spreadsheets (all identical, just a different series of numbers on each). I started the macro by telling it to go to a hard location in the first spreadsheet (where the list of numbers starts), then end-arrow down to the last number, then over to the next column where I have a vlookup function. Each day, the list on each spreadsheet may be shorter or longer, depending on which numbers are chosen. My macro unfortunately uses the same quantity of numbers on each spreadsheet each time, remembering the number of rows down when first created. How can I alter it so that it knows to stop at the last number in the list, regardless of how many are in the list, and be able to do it again when the list becomes shorter or longer? -- Richard Champlin Administrative Program Assistant II Children''''''''s Hospital & Regional Medical Center, Seattle |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
why dont shift+arrow or ctrl+arrow work in 2007 | Excel Discussion (Misc queries) | |||
How to add an arrow | New Users to Excel | |||
How to do the following by pressing the down arrow or up arrow key? | Excel Discussion (Misc queries) | |||
how to use shift and down arrow keys in a macro? | Excel Worksheet Functions | |||
Excel 2003 Macro ignores Arrow Keystrokes | Excel Discussion (Misc queries) |