need to DELETE cell b1 in 500 workbooks

i have 500 workbooks in a folder

i need to preserve data in column a and in b2:b...basically just need to move column B up one value
each workbook has varying length of rows

prior related question: http:Q_28618738.html

thanks
finnstoneAsked:
Who is Participating?
 
gowflowConnect With a Mentor Commented:
ok here it is.

Put this file anywhere but not in the folder you need to process. When you activate the button delete B1 from all files it will prompt you for a master folder select the folder it will process all csv files in that folder and all sub directories and delete B1 from these files.

As a precaution as we are deleting data I suggest you first simulate or take a copy of several files put them in a Temp directory and try it then look at the files to make sure it is what you want. Then you can go live with this.

This file will show you a trace of what it is doing.
Let me know
gowflow
DELB1-V01.xlsm
0
 
Phillip BurtonDirector, Practice Manager and Computing ConsultantCommented:
First of all, you need to open each spreadsheet in turn.
 
Use the code shown in Reading document properties in multiple files to do that.
 
The only changes you have to make are the last two sections. So, instead of all of the code from mySheet.Cells(introw, 1) = strFile downwards, use
 
    Sheets("MYSHEET").Cells(1, 2).Delete Shift:=xlUp
    ActiveWorkbook.Close SaveChanges:=True
 
where MYSHEET is the sheet name.
 
http://www.experts-exchange.com/Software/Office_Productivity/Office_Suites/MS_Office/Excel/Q_28619254.html
0
 
gowflowCommented:
your title says Delete B1 in 500 workbook

whereas your post says
in b2:b...basically just need to move column B up one value

that is not very clear this B2:B...

is it delete B1 in each workbook ?
Are they all in same folder or we have also subfolders and subfolders ... ?

gowlfow
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
finnstoneAuthor Commented:
yes delete b1 in every book
0
 
gowflowCommented:
one more question your cell B1 is in every sheet of these workbooks ? or only the first sheet ? are these what csv or xls or .. ?
gowflow
0
 
finnstoneAuthor Commented:
just the first sheet

they are csv
0
 
Phillip BurtonDirector, Practice Manager and Computing ConsultantCommented:
Sheets(1).Cells(1, 2).Delete Shift:=xlUp
    ActiveWorkbook.Close SaveChanges:=True
0
 
aikimarkCommented:
@finnstone

Put Phillip's statement in the file iteration loop from the prior question(s).
0
 
finnstoneAuthor Commented:
i pushed the button and nothing happens...i even tried writing the path value into the cell

any ideas?
0
 
gowflowCommented:
enable macros
gowlfow
0
 
finnstoneAuthor Commented:
awesome!
0
 
gowflowCommented:
Glad it worked.
gowflow
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.