Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 58
Default Find number in Row 1, Copy Paste Values in Rows below

I'm looking for help with a macro that will allow me to find every column
(from D:W) with a number in row1 (any number) and will copy the formula on
row 2 to row 100 on that column.

For example:

if cell D1 = 3 then copy the formula on D2 and paste on D3:D100
(also, IF POSSIBLE, copy D3:D100 AGAIN and paste as values on the same range)

repeat for all column where row1 has a number


Any help would be appreciated.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Find number in Row 1, Copy Paste Values in Rows below

Give this macro a try...

Sub CopyFormulas()
Dim Cell As Range
For Each Cell In Range("D1:W1").SpecialCells( _
xlCellTypeConstants, xlNumbers)
Cell.Offset(1).Copy
Cell.Offset(2).Resize(98).PasteSpecial xlPasteValues
Next
Application.CutCopyMode = False
ActiveCell.Select
End Sub

--
Rick (MVP - Excel)


"Alonso" wrote in message
...
I'm looking for help with a macro that will allow me to find every column
(from D:W) with a number in row1 (any number) and will copy the formula
on
row 2 to row 100 on that column.

For example:

if cell D1 = 3 then copy the formula on D2 and paste on D3:D100
(also, IF POSSIBLE, copy D3:D100 AGAIN and paste as values on the same
range)

repeat for all column where row1 has a number


Any help would be appreciated.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 58
Default Find number in Row 1, Copy Paste Values in Rows below

Thanks Rick
close, but not what I need
this one copy the value on row2 and paste it on row3-row100
I'm looking to copy the FORMULA on row2, paste it on row3-row100, THEN copy
the range row3-row100 and paste as values on the same range

hope is clearer now

again thanks for your help



"Rick Rothstein" wrote:

Give this macro a try...

Sub CopyFormulas()
Dim Cell As Range
For Each Cell In Range("D1:W1").SpecialCells( _
xlCellTypeConstants, xlNumbers)
Cell.Offset(1).Copy
Cell.Offset(2).Resize(98).PasteSpecial xlPasteValues
Next
Application.CutCopyMode = False
ActiveCell.Select
End Sub

--
Rick (MVP - Excel)


"Alonso" wrote in message
...
I'm looking for help with a macro that will allow me to find every column
(from D:W) with a number in row1 (any number) and will copy the formula
on
row 2 to row 100 on that column.

For example:

if cell D1 = 3 then copy the formula on D2 and paste on D3:D100
(also, IF POSSIBLE, copy D3:D100 AGAIN and paste as values on the same
range)

repeat for all column where row1 has a number


Any help would be appreciated.


.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 58
Default Find number in Row 1, Copy Paste Values in Rows below

Rick

I think I got it with your help

something like this seems to be working

Sub CopyFormulas()
Dim Cell As Range
For Each Cell In Range("g1:i1").SpecialCells( _
xlCellTypeConstants, xlNumbers)
Cell.Offset(1).Copy
Cell.Offset(2).Resize(98).PasteSpecial
Cell.Offset(2).Resize(98).Copy
Cell.Offset(2).Resize(98).PasteSpecial xlPasteValues
Next
Application.CutCopyMode = False
ActiveCell.Select
End Sub


"Rick Rothstein" wrote:

Give this macro a try...

Sub CopyFormulas()
Dim Cell As Range
For Each Cell In Range("D1:W1").SpecialCells( _
xlCellTypeConstants, xlNumbers)
Cell.Offset(1).Copy
Cell.Offset(2).Resize(98).PasteSpecial xlPasteValues
Next
Application.CutCopyMode = False
ActiveCell.Select
End Sub

--
Rick (MVP - Excel)


"Alonso" wrote in message
...
I'm looking for help with a macro that will allow me to find every column
(from D:W) with a number in row1 (any number) and will copy the formula
on
row 2 to row 100 on that column.

For example:

if cell D1 = 3 then copy the formula on D2 and paste on D3:D100
(also, IF POSSIBLE, copy D3:D100 AGAIN and paste as values on the same
range)

repeat for all column where row1 has a number


Any help would be appreciated.


.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Find number in Row 1, Copy Paste Values in Rows below

Sorry, give this macro a try instead...

Sub CopyFormulas()
Dim Cell As Range
For Each Cell In Range("D1:W1").SpecialCells( _
xlCellTypeConstants, xlNumbers)
Cell.Offset(1).Copy Cell.Offset(2).Resize(98)
Cell.EntireColumn.Value = Cell.EntireColumn.Value
Next
End Sub

--
Rick (MVP - Excel)


"Alonso" wrote in message
...
Thanks Rick
close, but not what I need
this one copy the value on row2 and paste it on row3-row100
I'm looking to copy the FORMULA on row2, paste it on row3-row100, THEN
copy
the range row3-row100 and paste as values on the same range

hope is clearer now

again thanks for your help



"Rick Rothstein" wrote:

Give this macro a try...

Sub CopyFormulas()
Dim Cell As Range
For Each Cell In Range("D1:W1").SpecialCells( _
xlCellTypeConstants, xlNumbers)
Cell.Offset(1).Copy
Cell.Offset(2).Resize(98).PasteSpecial xlPasteValues
Next
Application.CutCopyMode = False
ActiveCell.Select
End Sub

--
Rick (MVP - Excel)


"Alonso" wrote in message
...
I'm looking for help with a macro that will allow me to find every
column
(from D:W) with a number in row1 (any number) and will copy the
formula
on
row 2 to row 100 on that column.

For example:

if cell D1 = 3 then copy the formula on D2 and paste on D3:D100
(also, IF POSSIBLE, copy D3:D100 AGAIN and paste as values on the same
range)

repeat for all column where row1 has a number


Any help would be appreciated.


.




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Find number in Row 1, Copy Paste Values in Rows below

This modification to my last posted macro should be more efficient for your
given conditions...

Sub CopyFormulas()
Dim Cell As Range
For Each Cell In Range("D1:W1").SpecialCells( _
xlCellTypeConstants, xlNumbers)
Cell.Offset(1).Copy Cell.Offset(2).Resize(98)
Cell.Resize(100).Value = Cell.Resize(100).Value
Next
End Sub

--
Rick (MVP - Excel)


"Rick Rothstein" wrote in message
...
Sorry, give this macro a try instead...

Sub CopyFormulas()
Dim Cell As Range
For Each Cell In Range("D1:W1").SpecialCells( _
xlCellTypeConstants, xlNumbers)
Cell.Offset(1).Copy Cell.Offset(2).Resize(98)
Cell.EntireColumn.Value = Cell.EntireColumn.Value
Next
End Sub

--
Rick (MVP - Excel)


"Alonso" wrote in message
...
Thanks Rick
close, but not what I need
this one copy the value on row2 and paste it on row3-row100
I'm looking to copy the FORMULA on row2, paste it on row3-row100, THEN
copy
the range row3-row100 and paste as values on the same range

hope is clearer now

again thanks for your help



"Rick Rothstein" wrote:

Give this macro a try...

Sub CopyFormulas()
Dim Cell As Range
For Each Cell In Range("D1:W1").SpecialCells( _
xlCellTypeConstants, xlNumbers)
Cell.Offset(1).Copy
Cell.Offset(2).Resize(98).PasteSpecial xlPasteValues
Next
Application.CutCopyMode = False
ActiveCell.Select
End Sub

--
Rick (MVP - Excel)


"Alonso" wrote in message
...
I'm looking for help with a macro that will allow me to find every
column
(from D:W) with a number in row1 (any number) and will copy the
formula
on
row 2 to row 100 on that column.

For example:

if cell D1 = 3 then copy the formula on D2 and paste on D3:D100
(also, IF POSSIBLE, copy D3:D100 AGAIN and paste as values on the same
range)

repeat for all column where row1 has a number


Any help would be appreciated.

.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Find matching values, copy/paste values as well as values in ColA ryguy7272 Excel Programming 2 September 28th 09 06:20 AM
Find end of number and copy/paste 5 columns [email protected] Excel Programming 1 January 16th 08 05:50 PM
Find variable in Col B, Copy Paste Values in Cn:Tn to Row below Chris Excel Programming 5 November 28th 07 06:26 PM
Find Multiple Values, Copy Entire Row & Paste ryguy7272 Excel Programming 10 September 27th 07 10:48 PM
code to FIND value, copy, paste values onto other sheet ufo_pilot Excel Programming 2 December 6th 05 04:14 PM


All times are GMT +1. The time now is 07:26 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"