Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Copy sheets from A to B without reference

Any help

--
Message posted from http://www.ExcelForum.com



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Copy sheets from A to B without reference

Thanks. It is a good idea to do it!

--
Message posted from http://www.ExcelForum.com

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
copy cell info to other sheets, other sheets dont contain all row. Ja Excel Worksheet Functions 1 November 1st 09 12:53 AM
move or copy sheets doesn't copy format ColinX Excel Worksheet Functions 1 May 14th 08 10:07 PM
Reference sheets KKcags Excel Worksheet Functions 1 May 7th 08 09:20 PM
in VBA Sheets("mysheet").Copy Befo=Sheets(1) how do i get a reference to the newly created copy of this sheet? Daniel Excel Worksheet Functions 1 July 6th 05 09:57 PM
reference sheets MaxRott[_3_] Excel Programming 1 December 12th 03 09:14 PM


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

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

About Us

"It's about Microsoft Excel"