Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I recorded a macro that copies a cell in B1 across to I1:
Selection.AutoFill Destination:=Range("B1:I1") Type:=xlFillDefaultRange("B1:I1").Select I effectively copied it across 7 columns. How would I write this s that I can pass the number 7 to a variable and then uses this t quantify how many columns across from the start cell I want to cop from? Assuming start cell is B1. Thank-yo -- Message posted from http://www.ExcelForum.com |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
ExcelMonkey
something like: x = 7 Range("B1:C1").AutoFill _ Destination:=Range(Cells(1, 2), _ Cells(1, 2 + x)), _ Type:=xlFillDefault Regards Trevor "ExcelMonkey " wrote in message ... I recorded a macro that copies a cell in B1 across to I1: Selection.AutoFill Destination:=Range("B1:I1"), Type:=xlFillDefaultRange("B1:I1").Select I effectively copied it across 7 columns. How would I write this so that I can pass the number 7 to a variable and then uses this to quantify how many columns across from the start cell I want to copy from? Assuming start cell is B1. Thank-you --- Message posted from http://www.ExcelForum.com/ |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
copy a columns | Excel Discussion (Misc queries) | |||
Copy Columns | Setting up and Configuration of Excel | |||
How do I copy columns between worksheets if the columns don't matc | Excel Worksheet Functions | |||
Copy columns values into separate columns | Excel Discussion (Misc queries) | |||
how do I copy text to columns from one cell to another? | Excel Discussion (Misc queries) |