Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi, I want to perfor as very easy operation:
For a = 5 To ActiveSheet.Range("A1", Range("A65535").End_(xlUp)).EntireRow.Count Cells(a, 6) = Cells(a, 7) Next this is for all my worksheet, but if I want the user choose a specific region with the mouse and the program execute the same macro but just with the selected region, How? I mean, if the user select the range("f7:f25") then the limits of the for structure are 7 and 25, How to accomplish this??? TIA |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
filo666:
try, Dim myCell As Range, rng As Range Set myCell = Application.InputBox( _ prompt:="Select a cell", Type:=8) For Each rng In myCell Cells(rng.Row, 6) = Cells(rng.Row, 7) Next rng -- 天行健,君*以自強不息 地勢坤,君*以厚德載物 http://www.vba.com.tw/plog/ "filo666" wrote: Hi, I want to perfor as very easy operation: For a = 5 To ActiveSheet.Range("A1", Range("A65535").End_(xlUp)).EntireRow.Count Cells(a, 6) = Cells(a, 7) Next this is for all my worksheet, but if I want the user choose a specific region with the mouse and the program execute the same macro but just with the selected region, How? I mean, if the user select the range("f7:f25") then the limits of the for structure are 7 and 25, How to accomplish this??? TIA |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how copy formula that contains ranges so ranges do not overlap | Excel Worksheet Functions | |||
Like 123, allow named ranges, and print named ranges | Excel Discussion (Misc queries) | |||
named ranges - changing ranges with month selected | Excel Programming | |||
2 ranges into one | Excel Programming | |||
how to add 2 ranges | Excel Programming |