Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy sheets from A to B without reference
Hi all,
I know that when you copy a sheet from a workbook to another workbook references to the original cells are built. I have written a marco t remove the references, but it looks stupid. Therefore, is that any wa not to copy the reference to the new workbook? Any help is appreciated -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy sheets from A to B without reference
Why don't you show us your "stupid" macro? It might then be easier t
correct. Another option is to copy the cells instead of copying the sheet -- Message posted from http://www.ExcelForum.com |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy sheets from A to B without reference
Here the stupid code comes:
Sub OFA_Remove_References() Dim pos1 As Integer Dim pos2 As Integer Dim temp1 As String Dim temp2 As String Dim temp3 As String Dim c As Range Application.ScreenUpdating = False For Each c In Selection If c.Value < "" And InStr(1, c.Formula, "VLOOKUP" vbTextCompare) 0 Then pos1 = InStr(1, c.Formula, "'", vbTextCompare) 'First ' pos2 = InStr(pos1 + 1, c.Formula, "'", vbTextCompare 'Second ' If pos1 0 And pos2 0 Then 'remove the reference temp1 = Left(c.Formula, pos1 - 1) 'get the first part temp2 = Right(c.Formula, Len(c.Formula) - pos2 + 5 'get sheet name temp3 = Right(c.Formula, Len(c.Formula) - pos2) 'ge the later part c.Formula = temp1 & Left(temp2, 4) & temp3 End If End If Next c Application.ScreenUpdating = True End Su -- Message posted from http://www.ExcelForum.com |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy sheets from A to B without reference
Something that have to remind my saviour:
1) the name of each sheet is of length 4 2) most of the cell in the sheet use vlookup() function and the whol sheet can be considered as a template Thanks -- Message posted from http://www.ExcelForum.com |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy sheets from A to B without reference
|
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy sheets from A to B without reference
Can anyone give me an answer even it is not possible?
Thanks -- Message posted from http://www.ExcelForum.com |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy sheets from A to B without reference
How about an alternative?
http://groups.google.com/groups?thre...1C46%40msn.com "kaon <" wrote: Something that have to remind my saviour: 1) the name of each sheet is of length 4 2) most of the cell in the sheet use vlookup() function and the whole sheet can be considered as a template Thanks. --- Message posted from http://www.ExcelForum.com/ -- Dave Peterson |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy sheets from A to B without reference
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
copy cell info to other sheets, other sheets dont contain all row. | Excel Worksheet Functions | |||
move or copy sheets doesn't copy format | Excel Worksheet Functions | |||
Reference sheets | Excel Worksheet Functions | |||
in VBA Sheets("mysheet").Copy Befo=Sheets(1) how do i get a reference to the newly created copy of this sheet? | Excel Worksheet Functions | |||
reference sheets | Excel Programming |