Excel VBA macro to run on many files/sheets within a folder ..

  • Posted:
  • Proposals: 4
  • Remote
  • #37686
  • Archived
Excel Gurus ..Paul N.Nadia N.Dean R. have already sent a proposal.
  • 2

Description

Experience Level: Intermediate

Hi Everybody,

I got a number of Excel sheets/files (around 20000 files) in a folder, they contain a specific sort of information, I just need a VBA code to search each excel sheet for example for the word \"maximum memory\" [I can change the search terms later from : \"maximum memory\" to any other words] , then when it finds the cell that contains that \"maximum memory\" , just copy the WHOLE cell that includes it , then move 4 cells to the right side within the same row, then paste it, then save the file/sheet , then close , then go to the next file/sheet in the folder ... looping till the last file/sheet in that folder (E:\\0).

After the previous problem is solved with a VBA code, we need to advance it to repeat the process within every single sheet/file (e.g. to search for \"1\" , copy the cell, move 4 cells to the right side, paste, then search for e.g. \"2\" and do the same, then search for e.g. \"3\" then do the same .. etc, then it saves then close.

after running the code/macro on all files in that folder, and in the next stage, I need to delete column A from all these 20000 files/sheets.

After column A is deleted, then column B will be column A automatically, but it will have many blank rows, that we need to get them deleted with a VBA code.

Then at last I need to combine all the (20000 files/sheets in one big sheet)

To simplify the process, we will imagine the following:
you just create a folder, empty folder in any location you like, and inside that folder, create 1 excel file, empty file, then open that file, and in column A:1 type 1, and go down one cell, and type 2, ... until 5 , so it will be like this :
1
2
3
4
5

Then save this file and close it, then inside the same folder, create another excel file, empty file, open it, go to column B or C or any column you like, then type in any cell (randomly):

3
2

5

or make a copy of the first file, then open it and change manually the order of contents, like upside down or in any way you like, then save then close, in the same folder.

Now we need a macro to : SEARCH FOR 1, 2, 5 separately in all files in that folder ( they are now only 2 files, and later the macro will run on 20000+), and when it finds 1, let the macro select the whole cell that contains \"1\", copy that cell, move to the 4th right side cell, then paste it, and do the same with 2 and 5 , then save the file, then close it .. that\'s it

Then start over with the next file in this folder ...etc until the last file in the same folder.

Please note that, when running that macro, some files may include like :

1
2
.
.
.
1000+

But we only search for few specific words or terms.

Also, later, instead of 1, 2, 3, ...etc , we will change the searchable value, from 1 or ... etc to for example \"RAM Technology\" or ... any word or term we search for ..

I hope I made the picture clear for you.


Any help?

Many thanks

New Proposal

Create an account now and send a proposal now to get this job.

Sign up

Clarification Board Ask a Question

    There are no clarification messages.