Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default find replace in multiple sheets based on namebox

Hi!

I have a strage situation:

- around 50 excel files;
- each excel file with 200 sheets;

In each sheet I have to cell with the same content:

cell A35 has content: =A34+1
and the cell A40 has content =A34+1

I want to find replace in all sheets from one workbook and search for
A40 and replace the conten with: =A39+1

How can I do it?

I searched a lot on internet before to ask and no answer...

Thank you!

gabi
http://fotoblog.ro

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 43
Default find replace in multiple sheets based on namebox



Hi ,

try the following macro....



Sub test()

Dim FS As FileSearch
dim i as interger
Set FS = Application.FileSearch

FS.LookIn = "C:\Windows\... put your folder name here"

FS.FileType = msoFileTypeExcelWorkbooks
FS.SearchSubFolders = True
FS.Execute

For i = 1 To FS.FoundFiles.Count
Workbooks.Open (FS.FoundFiles(i))

For Each Sheet In ActiveWorkbook.Sheets
Sheet.Range("A40").Formula = "=A39+1 "
Next Sheet

ActiveWorkbook.Close (True)
Next i

End Sub

Regards
Ankur Kanchan
www.xlmacros.com



On Dec 19, 3:57 pm, "gabitzu" wrote:
Hi!

I have a strage situation:

- around 50 excel files;
- each excel file with 200 sheets;

In each sheet I have to cell with the same content:

cell A35 has content: =A34+1
and the cell A40 has content =A34+1

I want to find replace in all sheets from one workbook and search for
A40 and replace the conten with: =A39+1

How can I do it?

I searched a lot on internet before to ask and no answer...

Thank you!

gabihttp://fotoblog.ro


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default find replace in multiple sheets based on namebox

Thank you!

It works very fast!

You saved me from a long copy paste:)

gabi

http://fotoblog.ro


ankur wrote:
Hi ,

try the following macro....


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
Multiple Find and Replace in one function [email protected] Excel Worksheet Functions 4 September 11th 06 03:16 AM
Sum values in multiple sheets using Lookup to find a text match CheriT63 Excel Worksheet Functions 7 December 4th 05 02:33 AM
Find and replace of word causes change of font formatting jwa90010 New Users to Excel 4 July 22nd 05 08:10 PM
Using Find and Replace All HandsOnManager Excel Worksheet Functions 0 February 15th 05 07:43 PM
Multiple sheets selected twa14 Excel Discussion (Misc queries) 2 December 21st 04 11:15 AM


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