ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Macro modification (https://www.excelbanter.com/excel-discussion-misc-queries/28146-macro-modification.html)

Hirsch

Macro modification
 
Dim rngDataRange As Range

ActiveSheet.UsedRange.Select
Selection.Offset(0, 19).Select
Set rngDataRange = Selection

Range("T1").Select
Cells(1, 20).Copy
rngDataRange.Offset(0, 0).Resize(1, 1).Select
ActiveSheet.Paste
rngDataRange.Offset(0, 0).Select
Selection.FillDown

This is a portion of a macro I'm working on. The intent is to dump a
formula in cell T1, and use a fill down. Although this fill down
incorporates column T and 18 additional columns. What needs to be modified
to just have Column T fill down.

Bob Phillips

Try this

Dim rngDataRange As Range

Set rngDataRange = ActiveSheet.UsedRange.Offset(0, 19).Resize(, 1)
Cells(1, 20).Copy rngDataRange.Cells(1, 1)
rngDataRange.FillDown


--
HTH

Bob Phillips

"Hirsch" wrote in message
...
Dim rngDataRange As Range

ActiveSheet.UsedRange.Select
Selection.Offset(0, 19).Select
Set rngDataRange = Selection

Range("T1").Select
Cells(1, 20).Copy
rngDataRange.Offset(0, 0).Resize(1, 1).Select
ActiveSheet.Paste
rngDataRange.Offset(0, 0).Select
Selection.FillDown

This is a portion of a macro I'm working on. The intent is to dump a
formula in cell T1, and use a fill down. Although this fill down
incorporates column T and 18 additional columns. What needs to be

modified
to just have Column T fill down.




Hirsch

Thank you very much... it was perfect... I just struggle with these macros.

Thanks again

"Bob Phillips" wrote:

Try this

Dim rngDataRange As Range

Set rngDataRange = ActiveSheet.UsedRange.Offset(0, 19).Resize(, 1)
Cells(1, 20).Copy rngDataRange.Cells(1, 1)
rngDataRange.FillDown


--
HTH

Bob Phillips

"Hirsch" wrote in message
...
Dim rngDataRange As Range

ActiveSheet.UsedRange.Select
Selection.Offset(0, 19).Select
Set rngDataRange = Selection

Range("T1").Select
Cells(1, 20).Copy
rngDataRange.Offset(0, 0).Resize(1, 1).Select
ActiveSheet.Paste
rngDataRange.Offset(0, 0).Select
Selection.FillDown

This is a portion of a macro I'm working on. The intent is to dump a
formula in cell T1, and use a fill down. Although this fill down
incorporates column T and 18 additional columns. What needs to be

modified
to just have Column T fill down.





Bob Phillips

and simpler :-)

--
HTH

Bob Phillips

"Hirsch" wrote in message
...
Thank you very much... it was perfect... I just struggle with these

macros.

Thanks again

"Bob Phillips" wrote:

Try this

Dim rngDataRange As Range

Set rngDataRange = ActiveSheet.UsedRange.Offset(0, 19).Resize(, 1)
Cells(1, 20).Copy rngDataRange.Cells(1, 1)
rngDataRange.FillDown


--
HTH

Bob Phillips

"Hirsch" wrote in message
...
Dim rngDataRange As Range

ActiveSheet.UsedRange.Select
Selection.Offset(0, 19).Select
Set rngDataRange = Selection

Range("T1").Select
Cells(1, 20).Copy
rngDataRange.Offset(0, 0).Resize(1, 1).Select
ActiveSheet.Paste
rngDataRange.Offset(0, 0).Select
Selection.FillDown

This is a portion of a macro I'm working on. The intent is to dump a
formula in cell T1, and use a fill down. Although this fill down
incorporates column T and 18 additional columns. What needs to be

modified
to just have Column T fill down.








All times are GMT +1. The time now is 07:12 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com