LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default please help simplify

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
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
Simplify equation Stephen Christian[_2_] Excel Worksheet Functions 5 August 13th 09 03:19 PM
I need to simplify this... j5b9721 Excel Worksheet Functions 5 July 23rd 09 09:03 AM
Simplify Formula Mike Lewis Excel Worksheet Functions 1 July 4th 08 02:00 AM
simplify equation EBronco67 Excel Worksheet Functions 3 April 19th 06 08:00 AM
Simplify Josh[_7_] Excel Programming 4 January 9th 04 12:16 AM


All times are GMT +1. The time now is 11:18 AM.

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

About Us

"It's about Microsoft Excel"