Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 -- Regards, Tom Ogilvy "acarril" wrote in message ... I am trying to find specific information on a page and paste it in certain rows. this is what i have so far for the first two pages (but there is a 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? -- acarril ------------------------------------------------------------------------ acarril's Profile: http://www.excelforum.com/member.php...o&userid=10027 View this thread: http://www.excelforum.com/showthread...hreadid=262049 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Simplify equation | Excel Worksheet Functions | |||
I need to simplify this... | Excel Worksheet Functions | |||
Simplify Formula | Excel Worksheet Functions | |||
simplify equation | Excel Worksheet Functions | |||
Simplify | Excel Programming |