Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Finding Range of one Workheet used in another
I need to find the last row of worksheet A and use this as range fo worksheet B. Workshhet A can change row count so I need B to canhang as well Example: VBA: Range("A10").Select Selection.Copy Application.CutCopyMode = False ActiveCell.FormulaR1C1 = _ "=IF('Recap Report'!R[-3]C2="""","""",'Recap Report'!R[-3]C2)" Selection.Copy Range("A10:A56").Select << I Need this value To be As many rows As I worksheet(Recap Report) ActiveSheet.Paste Any Suggestions -- parteegolfe ----------------------------------------------------------------------- parteegolfer's Profile: http://www.excelforum.com/member.php...fo&userid=3195 View this thread: http://www.excelforum.com/showthread.php?threadid=52741 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Finding Range of one Workheet used in another
Hi Partegolfer,
I need to find the last row of worksheet A and use this as range for worksheet B. Workshhet A can change row count so I need B to canhange as well Dim LRow As Long Dim rng As Range LRow = Sheets("A").Cells(Rows.Count, "A").End(xlUp).Row Set rng = Sheets("B").Range("A10:A" & LRow) --- Regards, Norman "parteegolfer" wrote in message ... I need to find the last row of worksheet A and use this as range for worksheet B. Workshhet A can change row count so I need B to canhange as well Example: VBA: Range("A10").Select Selection.Copy Application.CutCopyMode = False ActiveCell.FormulaR1C1 = _ "=IF('Recap Report'!R[-3]C2="""","""",'Recap Report'!R[-3]C2)" Selection.Copy Range("A10:A56").Select << I Need this value To be As many rows As In worksheet(Recap Report) ActiveSheet.Paste Any Suggestions? -- parteegolfer ------------------------------------------------------------------------ parteegolfer's Profile: http://www.excelforum.com/member.php...o&userid=31951 View this thread: http://www.excelforum.com/showthread...hreadid=527414 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Finding Range of one Workheet used in another
something like myrow = Sheets("Recap Report").Range("A65536").end(xlup).row assuming column A will contain the highest row then in your code Selection.Copy Range(cells(10,1),cells(myrow,1).select ActiveSheet.Past -- duan ----------------------------------------------------------------------- duane's Profile: http://www.excelforum.com/member.php...fo&userid=1162 View this thread: http://www.excelforum.com/showthread.php?threadid=52741 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Finding Range of one Workheet used in another
Duane, I get a complie error in line - Range(cells(10,1),cells(myrow,1).select any ideas why? -- parteegolfer ------------------------------------------------------------------------ parteegolfer's Profile: http://www.excelforum.com/member.php...o&userid=31951 View this thread: http://www.excelforum.com/showthread...hreadid=527414 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Finding Range of one Workheet used in another
Sorry its a Syntax error Range(cells(10,1),cells(myrow,1).select -- parteegolfer ------------------------------------------------------------------------ parteegolfer's Profile: http://www.excelforum.com/member.php...o&userid=31951 View this thread: http://www.excelforum.com/showthread...hreadid=527414 |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Finding Range of one Workheet used in another
Hi Parteegolfer,
I suspect that your reply was intended for Duane rather than me. Try, however, adding a closing parenthesis: Range(Cells(10, 1), Cells(myrow, 1)).Select --- Regards, Norman "parteegolfer" wrote in message news:parteegolfer.25eynm_1143606301.3951@excelforu m-nospam.com... Sorry its a Syntax error Range(cells(10,1),cells(myrow,1).select -- parteegolfer ------------------------------------------------------------------------ parteegolfer's Profile: http://www.excelforum.com/member.php...o&userid=31951 View this thread: http://www.excelforum.com/showthread...hreadid=527414 |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Finding Range of one Workheet used in another
If column A is being filled with formulas, unless the formulas are
overwriting existing values, it seems unlikely the extent of the report could be determined from column A. Just a thought. -- Regards, Tom Ogilvy "duane" wrote: something like myrow = Sheets("Recap Report").Range("A65536").end(xlup).row assuming column A will contain the highest row then in your code Selection.Copy Range(cells(10,1),cells(myrow,1).select ActiveSheet.Paste -- duane ------------------------------------------------------------------------ duane's Profile: http://www.excelforum.com/member.php...o&userid=11624 View this thread: http://www.excelforum.com/showthread...hreadid=527414 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Workheet. | Excel Worksheet Functions | |||
Can I use variables for workheet name references in Excel functions? | Excel Discussion (Misc queries) | |||
Can I use variables for workheet name references in Excel functions? | Excel Worksheet Functions | |||
Adding checkboxes via code to a workheet | Excel Programming | |||
Finding from a range | Excel Programming |