Perform Same Task On All Sheets In A Workbook

Oct 31, 2008

I am trying to make certain changes to the page setup on all sheets in a workbook. Here is my code but something is not working. I think I need to somehow select the next sheet because the macro is only performing the task on the active worksheet. My Visual Basic skills are somewhat limited so I'm sure this is not the most efficient way.

View 3 Replies


ADVERTISEMENT

Perform Task Only If Cell Has Value

Jul 29, 2013

I have a large spreadsheet set up with multiple rows, I have the formula -

=a5&"repeated text"&c5

this brings back 2 results

test repeated text test
repeated text

In the instance this is the latter with no combined cell vale, how would I mass delete them?

View 2 Replies View Related

Perform Same Task To Multiple Worksheets That Contain Text Parameter

Jun 21, 2014

I am trying to do the following: I want to replace the values in A1:A3 with "0" and clear the contents of B1:B3 for all worksheets that contain "ILA" in the worksheet name. Is there a simple way to do this or another thread that already answers this question? I tried to search on the internet but found nothing useful. Here is a sample file (NOTE: there are no macros in this workbook even though it is saved as an .xlsm).

Clear and replace macro on multiple tabs.xlsm

View 5 Replies View Related

Reduce Macro Perform Array Of Sheet (not All Sheets)

Feb 3, 2010

How can I make this macro easier (smaller)? The same action is performed on an array of sheets (not all sheets).

View 4 Replies View Related

2 Of Same Workbook Open In Task Manager

Nov 30, 2006

I am running into a problem with my code. It sounds almost exactly like a previously posted problem 2 Copies of The Same Workbook Open in Task Manager but I never saw a fix.

I am also getting two copies of a workbook in task manager. It appears when I do a Workbooks.Open filename.

View 7 Replies View Related

Use VBA In Workbook A To Perform Actions In Workbook B

Apr 17, 2014

I was asked to parse and chart some data files. The data are obtained from a data acquisition system sampling a pressure transducer at about 300 samples per second. Since the start of the pressure event is created by a chemical reaction, there is no easy way to gauge when the the event will begin. As a consequence, the data acquisition system is left running continuously while waiting for the event.

Needless to say, at 300Hz, the data file grow very large, quickly. The data preceding the pressure event are close to zero and can be removed simply by using code which deletes rows with values less than a given threshold. An example of this code is:

Code:
Private Sub CommandButton1_Click()
Dim rng As Range, cell As Range, del As Range
Set rng = Intersect(Range("B20:B500000"), ActiveSheet.UsedRange)
For Each cell In rng
If (cell.Value) < 0.15 Then

[Code] ....

There are other operations that need to be performed as well. My question is whether if I have a workbook open with this and other code, will Excel allow operations on one or more open workbooks from this workbook? I would think that you can because you can move or copy a worksheet to another open workbook.

View 5 Replies View Related

Open Workbook And Perform Sumproduct

Feb 21, 2014

I have a workbook that contains two sheets that has 20k of rows of data and in a summry sheet I have a SUMPRODUCT and SUMIF formula together which performs the sum function on the large set of data based on a range of criteria on another sheet. Here's the formula:

=SUMPRODUCT(SUMIFS(BalSht!$F$2:$F$20175,BalSht!$B$2:$B$20175,CedantCode,BalSht!$K$2:$K$20175,'2. Booked Financials'!$A46))

The problem I have, is that by combining the large data set into my workbook it is becoming slow and unwieldy. I was thinking of having a macro button that when the user has input the criteria, they click the button and it then opens up another workbook and performs the sumproduct(sumif formula.

View 5 Replies View Related

2 Copies Of The Same Workbook Open In Task Manager

Oct 3, 2006

I have had some problems closing down a workbook that I have. During a save and close.

A duplicate file appears and causes considerable time delay...sometimes even causes a windows crash. I can't find the source of the problem, but I have noticed that in the Windows Task Manager, the file is there as well, yet not visible on the screen.

View 9 Replies View Related

Macro To Perform Operations On All Worksheets In A Workbook

Mar 30, 2007

I need a macro that will perform a set of oprations on all worksheets in a workbook. The names and number of worksheets will not always be the same. I have found several macros that look like they will do this, but when I try to add my code they don't seem to work.

View 9 Replies View Related

Perform Copy / Paste Between Sheets With Command Button And Add Message Box To Indicate Invalid Action?

Aug 23, 2013

I am trying to develop a system to allow me select different parts from multiple sheets and then add them into a bill of material on a separate sheet.

[URL] ...........

I have written some VB script the best I can and it includes a 'commandbutton' to make it easy for the user of the workbook to use.

This is how it works:

Go to 'Step 1 - Manifold 8640' tab and highlight one of the yellow cells.Once you have selected a yellow cell, you then click the 'select' button above.The value (along with other values) are copied to the 'Smart Calc' sheet.Then you go to 'Step 2 - Gland Plate' tab, select a yellow cell, click the 'Select' button.Notice how the 'Step 2 - Gland Plate' value is entered into a different group in the 'Smart Calc' sheet - this is great................BUT

The issue I am having is:

If the user goes to 'Step 1 - Manifold 8640' tab, highlights the desired yellow cell then presses the 'Select' button twice, it will add two lines of data in the relevant 'Step 1 - Manifold 8640' section....This is ok.But when the user clicks a third time, the 'Step 1' data will overflow into the 'Step 2' section of the 'Smart Calc' tab...because the script tells the data to look for the next available line to write to. This is what I am trying to avoid!

Instead, i would like a message box to popup to indicate to the user that they cannot add anymore data into into the 'Step 1' or 'Step 2' sections of the 'Smart Calc' tab until they clear the data from within the relevant section in 'Smat Calc'.

I would like to set limits on where each 'Step 1' or 'Step 2' data is written to the 'Smart Calc' sheet (so it is within its relevant section). As you can see the script basically looks for the next available cell but this isn't really good when the data 'overflows'.

Note that you are able to highlight the yellow cells in the 'Smart Calc' tab and press the delete key, it will delete the data to clear the line. That is how i designed it to work so if the user makes a mistake they are able to just delete the relevant line and enter new data.

View 1 Replies View Related

Loop Across Worksheets: Perform The Same Process To All The Worksheets In My Workbook

Aug 10, 2009

I'm trying to perform the same process to all the worksheets in my workbook. This is the code I have now, but it will only apply to the single active worksheet:

View 2 Replies View Related

Printing Multiple Sheets In Workbook With Hundreds Of Sheets

Feb 18, 2014

I have a work sheet named "Main_List"...In column D starting with "D2" I would like to list worksheets that I would like to have printed via VBA.

The workbook has several hundred worksheets and I would like to list in column D only worksheets that I would like to print with VBA code.

View 3 Replies View Related

Creating New Workbook / Copying Sheets And Saving Workbook - Subscript Error

May 30, 2014

Trying to create a new workbook from another open workbook, then copying all the sheets that aren't called "Summary" to that new open workbook and then saving it. I get a subscript error on this line:

[Code]....

View 3 Replies View Related

Hyperlink To Other Sheets Within Workbook When Sheets Change Name

Mar 24, 2012

I want to create a hyperlink to a sheet named "adsf"

I am currently in a worksheet named: "62b Arcus"

I want the hyperlink to be set by grabbing the name from another cell.

For example, In cell h7, I have the text: adsf

In cell g7, I want to place a formula such as: =HYPERLINK("adsf!")

Except, instead of this, I want: =HYPERLINK("h7!")

In this way, i want it to hyperlink to a sheet name based on the text that is in h7.

But neither of these formulas work. Both say the following: "Cannot Open the Specified File"

After reading up on this I have discovered that I must save the file and include the file name inside the formula.

My file name is: [Maintenance Color Codes of Houses - colour coded2.xlsm] =HYPERLINK("[Maintenance Color Codes of Houses - colour coded2.xlsm]adsf!A1","LINK")

This hyperlink actually works. Yet I have a problem. What if I rename the file. For this reason, I want it to grab the current file name using "filename". I have tried this by the following:

=MID(CELL("filename"),SEARCH("[",CELL("filename")),SUM(SEARCH("]",CELL("filename")),-SEARCH("[",CELL("filename")),1))

This grabs the current file name "Excluding the text outside of the [ and ]. I was able to create this formula myself.

How come I can't replace the part with [ and ] =HYPERLINK("[Maintenance Color Codes of Houses - colour coded2.xlsm]adsf!A1","LINK")

with:

=MID(CELL("filename"),SEARCH("[",CELL("filename")),SUM(SEARCH("]",CELL("filename")),-SEARCH("[",CELL("filename")),1))

These two formulas together would be:

=HYPERLINK("MID(CELL("filename"),SEARCH("[",CELL("filename")),SUM(SEARCH("]",CELL("filename")),-SEARCH("[",CELL("filename")),1))adsf!A1","LINK")

I also want to replace the "adsf" part with a cell number such as h7. So that it says h7!A1","LINK") or in full:

=HYPERLINK("MID(CELL("filename"),SEARCH("[",CELL("filename")),SUM(SEARCH("]",CELL("filename")),-SEARCH("[",CELL("filename")),1))h7!A1","LINK")

This doesn't work either

I know that I have probably created a ridiculous formula for what I am after. I'm almost there but not quite. You may know something far, far more simple.

View 5 Replies View Related

Copy Data From Multiple Sheets In Workbook To Different Workbook But On One Worksheet

Feb 7, 2014

I am looking for a code that would copy the data from each worksheet in a given workbook and then paste to just one worksheet within a different workbook. The Sheet names are auto generated when I run this canned report but the naming structure is always the same...the first worksheet is named Repair Details and then the next sheet is named Repair Details_1, the next sheet is named Repair Details_2 and so on for every sheet in workbook. So I would like to copy all of the data(Headers to last cell) and then paste in a worksheet(ex: Master Repair Report.xlsx and the worksheet could be titled Master Repair Details) on a different workbook, then the next sheet would copy from the one under the header to the last record and paste to the same workbook. This process would repeat for every worksheet in the Repair Details Workbook and paste to Master Repair Details worksheet in the Master Repair Report workbook.

View 4 Replies View Related

Delete Sheets And Create New Workbook In Shared Workbook

Jun 2, 2014

I wrote a code in unshared workbook and it works fine. But when i make it shared i get Run-time error '1004' Delete method of worksheet class failed.

The Deleting of worksheet only occurs once (when the new wb is created) so is there i can unshare and share it back when the process is complete?

View 3 Replies View Related

Create New Workbook With Separate Sheets From Data In Another Workbook

Jul 16, 2012

I have been tasked with creating a macro which creates a new workbook wherein each sheet contains the information for one site from the active sheet. The active sheet already has the values sorted by the site such that all information needing to be copied from the active sheet into the new workbook is together.

I.E.

ATL
ATL
ATL
ATL
CEN
CEN
JCK
JCK
etc.

There are 8 different sites on the active sheet: ATL, CEN, DAL, HAR, JAS, JCK, VIS, NOV

The macro needs to find the range for all of the data of each site and copy/paste that data into a new workbook such that ATL would have its own sheet, CEN would have its own sheet, and so on. The data ranges from A:R.

So, for example, the macro would find that the last row with ATL in the "B" column is 6095 and would then copy A2:R6095 and insert that data into the new workbook under Sheet 1.

I had some code that I had adapted to select the range for each of them, but the code loops through the entire sheet (which is 44,307 rows long) for each site making it a quite clunky and very slow step in an even longer macro. Since the data is already sorted, I know there must be a way to have the macro stop searching when it reaches data not equal to the data the row before, however, my experience with VBA is limited, and I have been unable to find a solution. Also, the data does not have to be conserved after being sent to the new workbook, if that would speed up the macro.

View 5 Replies View Related

Macro To Create New Workbook And Sheets Inside Each Workbook

Mar 31, 2009

I have a spreadsheet which has all the names of trips from a warehouse, the day that they operate (1,2,3 etc) and the job line allocated to each trip. It looks something like that:

A B C
DAYTRIPCUST

I would like to create a macro that will be creating 7 new workbooks and then in those workbooks as many sheets as the trips. In these sheets, the customers should be displayed.

How do I write it? I could not find how to have a "dynamic choice" in the macro. I.e. not to have the criteria as "1", "trips1" but to choose from the range of inputs that are available.

View 9 Replies View Related

Copy Workbook Sheets To New Workbook

Oct 17, 2007

I am unsure where to go from here. The sheets are named with numbers 1 thru 100.

With a cell reference "D1" that selects the corresponding page, 1 - 100, I want to select it along with the other sheets in the array and copy to a new workbook.

Dim i As Integer
i = Sheets("I-CF").Range("D1").Value

WB1.Sheets(Array("I-CF", Sheets(i).Name, "Util")).Select
Sheets(Array("I-CF", Sheets(i).Name, "Util")).copy

View 6 Replies View Related

Looking Up 2 Conditions Before Performing Another Task?

Jul 12, 2013

I'm a fairly new user to using VBA and I'm currently running into a little snag. I'm trying tu create userform which will let me know if a person already exists in my sheet by looking up the last name in "A", then looking up his first name in "B", if such entry exists then display a message saying " Yes". If entry user has not been entered in the sheet then use a combox, to select the reason , then choose a date ( i have a working date picker ). Then entry should be entered in sheet (Name, Surname, Reason, date).

Whats working, I can use all of the above to enter all the info into the sheet, what I need to do is verify if user is alread in there, if not, then add it. The so on and so forth

View 3 Replies View Related

Cannot Complete This Task With Available Resources.....

Nov 26, 2008

Excel cannot complete this task with available resources. Choose less data or close other applications. My file is only about 3mb in size, made up of 17 worksheets. These sheets are calculated by referencing to another file that contains all of the background data. The data file is also about 3mb, made up of 13 worksheets.

There are probably about 2 - 3 thousand formulas in the file in total, ranging including vlookups, sumifs, sumproducts, etc. When the data was contained within the file there was no problem. I moved each data sheet into a new workbook to trim the size of my file and also stop the incessant calculation and this is when the problem started. Now, when I open the file and am prompted to update, it will update to about half way and then throw up the error message!

View 4 Replies View Related

Next Occurrence For Specific Task

Jan 11, 2012

I have 2 sheets with a formula in sheet 2 looking to pick up information from sheet 1. the formula in sheet 2 is:

=HLOOKUP(C8,'Cost-Effort'!$B$7:$AH$42,26, FALSE)

But C8 appears in W7 and X7 in sheet 1 and will only pick up the first Occurrence and I need it to pick up the second Occurrence for this specific task.

View 6 Replies View Related

VBA In Cloud With Task Scheduler

May 6, 2013

I have this excel workbook with VBA code that starts when the workbook is opened.

Every day at 12:00 the windows task scheduler opens the file (hidden). The problem is that my computer is not always turned on at 12:00 hence it would be better if I could store the file in the cloud and run task scheduler from there.

In an optimal world there also has to exist a dropbox connection.

View 2 Replies View Related

From PDF To Excel - Any Way To Automate This Task

Jun 6, 2013

I have a PDF sheet with info laid out like this:

Code:
Peter Paul Mary
Text Corporation
One two three street
Mars, New York 90000 USA
phone: (111) 555-2222
email: tellmewhy@yahoo.com

There are 10 names and addresses like this on each PDF page and the entire PDF file has 50 pages so to manually copy and paste each bit of info into separate cells on the spreadsheet's appropriate cells "Name, Company, Address, State, Phone, Email" e.t.c is too difficult.

View 1 Replies View Related

Repetitive Task - Different Output?

Nov 6, 2013

I need a macro in a excel for the below scenario:

1)i have merged cells from A1:B3

2)if i click on a macro the output in the above cells should be as follows"

"Login to database"

3)if i run the same macro for the 2nd time the output should be:

"Are you done with the reporting?"

4)if i run for 3rd time the output should be:

"Logoff from database"

5)Say example if i run the same macro for 1o times i should get 10 different outputs....if i run for the 11th time the output should get repeat from 1st....

6)Output need not be in order....random also fine...

If possible gimme 2 different codes:

1)Output should be in the order wise from 1-10 and get started from1 again

2)Output should be random....

View 4 Replies View Related

Calculating Task Time

Mar 18, 2007

I have a sheet to calculate Time Elapsed based on StartDT & EndDt taking into consideration the actual working hours in any working day and the function exclude the weekend. I am not a guru in excel but i found this formula in this website .

=IF(AND(INT(StartDT)=INT(EndDT),NOT(ISNA(MATCH(INT(StartDT),HolidayList,0)))),0,ABS(IF(INT(StartDT)=INT(EndDT),ROUND(24*(EndDT-StartDT),2),
(24*(DayEnd-DayStart)*
(MAX(NETWORKDAYS(StartDT+1,EndDT-1,HolidayList),0)+
INT(24*(((EndDT-INT(EndDT))-
(StartDT-INT(StartDT)))+(DayEnd-DayStart))/(24*(DayEnd-DayStart))))+
MOD(ROUND(((24*(EndDT-INT(EndDT)))-24*DayStart)+
(24*DayEnd-(24*(StartDT-INT(StartDT)))),2),
ROUND((24*(DayEnd-DayStart)),2))))))
the formula works perfectly except for the fact that in our part of the world we have "Friday & Saturday" as the weekend days instead of Saturday and Sunday.

is there a way to get this formula or any similar formula to take different weekend days and do exactly what i need?

View 9 Replies View Related

Cannot Complete The Task With Available Resources

Dec 22, 2006

I need to work with a spreadsheet with 15000 rows of data. By the time I link this file with my final file and add formulas, my file has reached a massive size and the following pop up error message appears.

View 3 Replies View Related

Task Bar Buttons Moving

Jun 19, 2007

I am using code that creates a new workbook and then copies a number of sheets to the new workbook. I am using Application. ScreenUpdating = False but as the sheets are being copied over, the Excel task bar button jumps around.

View 2 Replies View Related

Monthly Task List

Sep 21, 2007

I am trying to create a task list from a master matrix of items to be completed. When fully populated the maters matrix should have approximately 200 items to be completed over the year. I want to create a monthly to do list in EXCEL based on the master matrix. Some reports will be due on various timeframes. The reports will also be assigned to different workers. I would also like to be able to provided brief instruction for each task. Items will be added and subtracted from the master list based on changing requirements. I would like each month to be a different tab in the workbook. Attached is a spreadsheet that better explains what I am looking to create.

View 7 Replies View Related

Run Macros In Scheduled Task

Nov 24, 2007

I've used Excel 2003 to write a macro to analyse some date from our internal proprietary database. I use some Perl to generate a bunch of csv files from the data, and the run the macro to generate graphs and statistics from that. What I would like to do now is run this entire operation as a scheduled task, so that, every week or so, the data is downloaded, the processing is done on the csv files, and the results are saved to a location to be viewed on our internal site.

I'm assuming that the best way to do this would be somehow run something from the command line (to be embedded in a script) which basically says "1) Open this csv file 2) run this macro 3) save the output to this location", but I can't figure out how this can be done.

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved