please help simplify

  • Thread starter Thread starter acarril
  • Start date Start date
A

acarril

I am trying to find specific information on a page and paste it i
certain rows.
this is what i have so far for the first two pages (but there is
total of 95 pages):
Columns("D:D").Select
Selection.Insert Shift:=xlToRight
Range("D8").Select
ActiveCell.FormulaR1C1 = "=RIGHT(R[-3]C[-3],2)"
Selection.Copy
Range("D9:D63").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone
SkipBlanks _
:=False, Transpose:=False
ActiveWindow.SmallScroll Down:=11
Range("D74").Select
ActiveCell.FormulaR1C1 = "=RIGHT(R[-3]C[-3],2)"
Selection.Copy
Range("D75:D129").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone
SkipBlanks _
:=False, Transpose:=False
ActiveWindow.SmallScroll Down:=11

Is there an easier way
 
The code you show doesn't find anything.
for what it appears to do, you could do

Sub AddColumnD()
for each sheet in ThisWorkbook.worksheets
sh.Activate
set rng = Range(Cells(5,1),Cells(rows.count,1).End(xlup))
columns(4).Insert
rng.copy
Range("D8").PastSpecial xlValues

for each cell in rng.offset(3,3)
cell.Value = Right(cell.Value,2)
Next

' if you want to skip D65:D73 uncomment the next line
'Range("D65:D73").ClearContents
Next
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top