Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 57
Default Copy & edit formula

Hi Guys,
I'm battling to get a macro to perform the following:
My workbook contains 150 sheets [stock items] on each sheet variuos
information appears. I've got a summarysheet witch reflect all information
from the sheets.
It's much easier to copy the formulas from column A [which contains all 150
shhet names] on the summary sheet to column B. The sheet names remains te
same of course, but the cell adress changes. I've tried the macro recorder
without sucess.
To summirise I would like to copies the formula in column A [Sheet 1 "B2"]
to column B [Sheet 1 D2] etc.
Any help would be appreciated
Thanks
--
HJN
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 226
Default Copy & edit formula

Hi Hennie

Just a quick post, I’m not entirely sure what you are trying to do in
your post but it looks to me that the first cell in column A holds the
value in the cell B2 on Sheet 1, and from there you want to use a
modified version of the formula you used to put that information into
that cell to show the cell D2 on Sheet 1 in the first cell in column
B. In effect using the same formula but swapping out the B for a
D??? If this is the case you can use the “Replace” function to change
the column letter. The code below will do that but if this is not
what you are after please post back with some of your formulas and I
will see if I can help.

Sub ChangeCellLetter()

Dim LastRow As Integer

LastRow = [A65535].End(xlUp).Row

For i = 1 To LastRow

Cells(i, 2).Value = Replace(Cells(i, 1).Formula, "B", "D")

Next i

End Sub

Thanks

Steven


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
How to copy, edit then paste a macro. Romileyrunner1 Excel Worksheet Functions 1 September 8th 09 10:58 PM
I just selected Move or Copy from Edit Enviro Excel Discussion (Misc queries) 1 November 8th 06 01:32 PM
Edit/Move or Copy Creating .xls on Tab Tina, FSG Corp. Excel Worksheet Functions 0 January 10th 06 02:00 PM
macro to copy and edit then delete a worksheet lschuh Excel Discussion (Misc queries) 13 July 27th 05 09:02 PM
HOW DO I COPY A CONDITIONAL SUM (sumif) AND EDIT IT? (THE SUM NEV. ailsa.fraser Excel Worksheet Functions 5 April 22nd 05 03:10 PM


All times are GMT +1. The time now is 02:08 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"