LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 410
Default Change Formulas W/VBA

I have put in code to copy formulas to all the correct cells, now I
need to go in and replace all of the ones with what the row number
is. The below code does nto work. Active cell never happens so it
bugs out.

Thanks,
Jay

LstRow = Sht.Range("A65536").End(xlUp).Row
Set Rng = Sht.Range("F3:F" & LstRow)
Sht.Range("F" & LstRow) = Sht.Range("F1").Formula

For Each i In Rng
i = Sht.Range("f1").Formula
ActiveCell.Replace What:="1", Replacement:=i.Row, LookAt:=xlPart,
_
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False,
_
ReplaceFormat:=False
i = i.Value
Next i
 
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
need to change linked formulas jolowe Excel Discussion (Misc queries) 1 June 6th 08 09:34 AM
copied formulas on Excel the value doesn't change Jane Excel Worksheet Functions 2 November 27th 06 04:50 AM
Is there a way to keep the formulas and change their source data? Shannon Excel Discussion (Misc queries) 3 May 22nd 06 08:01 PM
Has anyone had formulas change automatically with no explanation? DavidA3878 Excel Worksheet Functions 1 November 2nd 05 12:42 AM
Why does Excel change my formulas? cranston Excel Discussion (Misc queries) 2 July 15th 05 06:07 AM


All times are GMT +1. The time now is 11:37 PM.

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"