Macro To Collapse Subtotals Results In: Cannot Shift Objects Off Sheet

Aug 6, 2008

I'm getting a runtime 1004 error "Cannot Shift Objects Off Sheet" right at the line when i am trying to collapse a subtotal (showlevels, rowlevel 2). I searched about this and i tested. I cannot find any comments, hidden comments, rows or columns. I cannot find any shapes (ran "Kill_Shapes" posted by Aaron Blood).

Sheets("Oxnard Planning 10 (all)").Activate
'SORT: Del Code (D), then Style (A)
Range("A1").Sort Key1:=Range("D1"), Order1:=xlAscending, _
Key2:=Range("A1"), Order2:=xlAscending, Header:=xlYes, OrderCustom:=1, _
MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal, DataOption2:=xlSortNormal
'Subtotal by STYLE
Range("A1").subtotal GroupBy:=1, Function:=xlSum, TotalList:=Array(5, 6, 7, 8, 9, 10, 11), _
Replace:=True, PageBreaks:=False, SummaryBelowData:=True
'Subtotal lines = Bold & Pink
ActiveSheet.Outline.ShowLevels RowLevels:=2 '<< ERROR:Cannot shift Objects off Sheet
With Range(Range("K65536").End(xlUp), "A1").SpecialCells(xlCellTypeVisible)
.Interior.ColorIndex = 38
.Font.Bold = True
End With
ActiveSheet.Outline.ShowLevels RowLevels:=3

View 2 Replies


ADVERTISEMENT

How To Shift Objects Of Sheet

Jan 10, 2012

I have a Master sheet linked with another worksheets with formula.

Now I want to insert 1 column in between , and when trying to insert the column in it a message sowing that " Cannot Shift Objects of Sheet"

Why this error shwoing and how can i insert any column in it.

View 7 Replies View Related

Excel 2010 :: Cannot Shift Objects Off Sheet

Nov 13, 2012

I'm trying to hide a few columns on my spreadsheet. I'm getting a "cannot shift objects off sheet" error message 2010 Excel program. I never had trouble with my 2003 excel.

There are no comments on this sheet, 'Display options for this workbook' already says all. I do have macro buttons on the top... but changed them all to move and size with cells.

View 1 Replies View Related

Error Inserting Rows Cannot Shift Objects Off Sheet

Mar 1, 2007

I am running excel 2007 and I have 23 worksheets in a workbook. I have no links or hidden rows or colums. I have no merged cells or comments. My biggest sheet is A1:

AW8096. I use VB macros to add lines and move data from one set of workbooks to this one.

I have built several sheets using this proceedure.

All of a sudden I get the error "Cannot shift objects off sheet" when I run
a routine I have 50,000 times. This even happens on new blank sheet so I know its' not on the sheet.

I have checked to make sure there are no hidden comments, row or columns. I have deleted most of the worksheets and I still get the error. I have made copies of the workbook and used different file types to save it. I can create a new black sheet in the workbook that is empty and the same thing happens.

The only way I can get it to work is to creat a new blank workbook and copy and paste the sheets into the new workbook. Yes I have serched the FAQ and knowledge base and tried all of those fixes as well.

View 9 Replies View Related

Sorting Results Of Subtotals

Jan 4, 2009

how to sort the results of a sheet that I have subtotaled twice by sum?

View 9 Replies View Related

Print Color Objects But Not Objects That Are Highlighted / Colored For Input And Grids?

Dec 27, 2013

So I'm creating a grid worksheet for engineering calculations and I have a couple questions about the best way to do it. I've been messing with excel for my calcs for about a decade now, and I every once in a while I try and improve them.

First: I will have several input areas that will either be colored text or shaded background (either works for me). I don't want these 'input required' objects to print as color, just black. But I want my logo at the sheet top to print as color. I've only found ways to not print any color. Can I print the logo as color and the 'input required' stuff as black?

Second: When I do calcs by hand, I write them out on 10x10 grid paper. Each 10x10 grid is one inch. In the past I've created this grid out of the cells, which works. I frequently need to change formulas around though, and each time I do this, I end up needing to mess with the grid cells also. Is there a way to create the grid and have it in the background so it doesn't need to be adjusted each time I change formulas? I wan't the grids to print, and also want to see them on the screen, as I sometimes draw simple objects along with the formulas.

View 9 Replies View Related

Sheet About 160 Rows Which Contains Subtotals And Filters

Jan 16, 2009

i have an excel sheet about 160 rows which contains subtotals and filters and the problem is taht when i insert the row in it it's speed will become very slow and i am using only one sheet in this file which contains data it takes about 30 to 40 seconds to get back on its normal speed and also sometimes when i insert data in it the speed problem is happen.

i use this file on two computers and the speed of both the computers is very good but this file showing same speed problem.

View 9 Replies View Related

Excel Cannot Copy Objects To Another Sheet

Apr 5, 2013

I have a big macro that runs in everyone's PC except mine. Once I debug it, it shows that it stocked at copying the objects from a template sheet to another sheet. When I try doing it manually, I still can not copy the objects to another sheet. It copies the sheet but except the objects in it. Is it related to my settings?

View 6 Replies View Related

Cannot Move Objects Off Sheet Error

Oct 18, 2013

I have a database that lets me add columns and do the required vlookups however, when I filter with a particular rule it throws the 'Cannot Move Objects Off the Sheet' error. Also, I cannot see any rows beyond row number 4316 - could this be the reason for the error?

Under 'Advanced' options, I've gone to 'Display options for this workbook' and chosen the 'All; option under 'For Objects show', however, I'm stick not getting anywhere

View 2 Replies View Related

Allow Editing Objects On Protected Sheet

Dec 12, 2007

I am using a VBA script to protect my workbook and allow grouping on workbook open:

Private Sub Workbook_Open()
With Sheet1
.Protect Password:="", UserInterfaceOnly:=True
.EnableOutlining = True
End With

How can I enable "Edit Objects" with this? I want the user to be able to edit comments as well. I am NOT looking to do this by checking the box when I protect a sheet; this effect is gone once the book is opened again, and the above macro runs.

View 2 Replies View Related

Lookup Wage Calculations (calculate Pay Per Shift Dependant On The Type Of Shift)

Dec 1, 2009

I have the basics set up, but need to work out how to make it calculate my pay per shift dependant on the type of shift i have worked.

I have attached a screen shot of the current page,

In it i have currently used validation drop boxes for the location and worked columns with tables just to one side of the sheet.

The shift pay is the column i am having trouble with.

I would like it to change dependant on what is selected in the 'worked' column.
For most things it should just display basic plus holiday, however if supervisor is selcted in the work column, it should display basic plus holiday plus supervisor.

View 3 Replies View Related

Subtotals Macro Column Name

Jun 25, 2009

Is there a macro to subtotal by column name then only total certain columns? Like the data below, can I subtotal by Key then I only want the subtotals to show Price, Sale Price, QTY,, Warranty, Credit, and Cash. So I dont want to subtotal % cash?

key Price Sale Price QTY Warranty Credit % Cash Cash Camera 502 61 10 5 3 15% 15 Phone 1346 234 10 5 3 15% 15 TV 13216 479 10 5 3 15% 15 Camera 484 131 10 5 3 15% 15 Phone 3 231 10 5 3 15% 15 TV 24 12 10 5 3 15% 15 Camera 138 21356 10 5 3 15% 15 Phone 3168 12 10 5 3 15% 15 TV 1348 12 10 5 3 15% 15 Camera 502 12346 10 5 3 15% 15 Phone 1346 132456 10 5 3 15% 15 TV 13216 61 10 5 3 15% 15 Camera 484 234 10 5 3 15% 15 Phone 3 479 10 5 3 15% 15 TV 24 131 10 5 3 15% 15 Camera 138 231 10 5 3 15% 15 Phone 3168 12 10 5 3 15% 15 TV 1348 21356 10 5 3 15% 15 Camera 138 12 10 5 3 15% 15 Phone 3168 12 10 5 3 15% 15 TV 1348 12346 10 5 3 15% 15 DVD 1348 132456 10 5 3 15% 15

View 9 Replies View Related

Grouping Objects Then Copying And Pasting Onto Another Sheet

Dec 18, 2008

doesnt work when recording a macro because the group name changes each time I group the pictures (visios) and the picture names change depending on what is on the sheet at the time.

Is there a way to group every picture on a sheet1 (excluding macro buttons), then copy them to sheet 2?

View 14 Replies View Related

Calculate Pay For Shift Work With Different Rates Based On Shift Hours

Apr 11, 2008

a person works for certain hours and get paid according to the hours worked either by day or by night or a mix of both. Day payment is $8 when worked between 08:00 and 19:59 , night payment is $12 when worked between 20:00 and 07:59. The excel cell are formatted as datetime with yyyy-mm-dd hh:mm , the function works fine in getting the time information and checking whether the whole work is all day or all night , yet the if-then-else statements for calculation seems to be wrong!!

examples:

start = 2008-01-01 09:15 , end = 2008-01-01 11:40 , all day as it is between 08:00 and 20:00 and cost = 8/hr = 19.333

start = 2008-01-03 21:05 , end = 2008-01-04 02:05 , all night as it is between 20:00 and 08:00 and cost = 12/hr = 60.000

start = 2008-02-02 19:00 , end = 2008-02-02 20:05 , cost = 9.000 as 1 hour day = 8.000 plus 5minutes night = 1.000

Function prod(st As Date, en As Date) As Double
Dim shour As Integer
Dim smin As Integer
Dim ehour As Integer
Dim emin As Integer
Dim stod As String
Dim etod As String
pday = 8
pnight = 12
shour = Hour(st)
smin = Minute(st) + shour * 60
If (shour >= 8 & shour < 20) Then
stod = "day"
Else
stod = "night"
End If
ehour = Hour(en)
emin = Minute(en) + ehour * 60
If (ehour >= 8 & ehour < 20) Then.................

View 8 Replies View Related

Macro To Transfer Subtotals From Worksheet Into Another

Jul 12, 2013

I'm having trouble with this macro I'm trying to write. I have a worksheet that's subtotaled like this:

Cash 100,000
Land 65,000
Equipment 104,000
Kroger Foods Total 269,000

Cash 200,000
Buildings 25,000
Equipment 25,000
Prepaid Rent 50,000
Whole Foods Total 300,000

The data is obviously just an example, but that's how it's set up (a subtotaled worksheet with three columns). My issue is that I need to write a macro to copy these numbers in column 2 (ex. land - $65,000) and paste them in a cell in another worksheet that finds the particular cell to paste it in based off column 1 and column 2.

For instance:

Cash Equipment Land Prepaid Rent
Whole Foods
Kroger

Essentially, I'm trying to find a way to copy the totals in column three and paste them into a cell in a certain row (based on column 1), and column (based on column 2). I'm pretty lost, and I just need some guidance as to how to tackle this. So far my code sets column 1 and 2 as strings and sets the columns in the second worksheet to these strings, and from there I'm lost

View 7 Replies View Related

Macro To Apply Subtotals To Multiple Sheets

Jul 7, 2006

I am trying to loop through all of my worksheets in my workbook to apply a subotal to each of the sheets. I can get it to work with applying to just one named sheet, but I cannot get the loop to work. The sheets named "data" and "PriceList" do not need the subtotal applied.

Below is the code I am using:

Sub SubTotals()
Dim LastRow As Long
Dim wsDst As Worksheet

View 5 Replies View Related

Return The Value Of The Shift Time On Other Sheet

Mar 30, 2009

I have a worksheet that contains a 5 week shift pattern for workers. It is briefly laid out as:

JanFebAB
111330-21300700-1400
221230-20300700-1400

Months Jan to Dec 09 are there and shifts are divided up to ABCDE. I need another sheet to return the value of the shift time i.e. 1330-2130, probably via a lookup?? In my second sheet I have the Day number, the month and the shift letter.

View 2 Replies View Related

Protect Sheet Allowing Users To Format Rows/Edit Objects?

Nov 16, 2009

I want my macro to protect my sheet again after it is done to allow editing objects and formatting rows. I am really stuck and have come up with the below, but it isn't working.

View 5 Replies View Related

When Protect The Sheet - Delete And Shift Up Disable

Aug 8, 2013

I have a sheet,i want the users unable to select any cells,but a column is free to select an change and enter the inputs. I want to delete and shift up zero cells on that free column,but this property is disable when i protect the sheet.

How I protect other cells from selection and change,and enable delete and shift up for the column that not protected.

For example: I have the attachment file,every column is protected except column "H". I want a macro to when I clear content of any cell in this column,every cells shift up and every non zero cell put from row 1 to... and after them zero cells put.

View 2 Replies View Related

Error Occurs While Inserting Row - Cannot Shift Object Off Sheet

Dec 7, 2011

I have very old file which contains lot of sheets. And I am unable to insert rows in any of the sheets in the file. It throws an error "Cannot shift object off sheet".

View 2 Replies View Related

Custom View Error. Cannot Shift Object Off Sheet

Jun 15, 2008

I have a very wide sheet in which I have hidden and saved seven views.I am using it for a very long time but when i did some edit work in the 'full' view,the other views are not showing. In stead I am getting the messages "cannot shift objects off sheet" and "some view settings could not be applied".This is very frustrating since a lot of patience was tested while making this wide data.

View 2 Replies View Related

Grouped Objects Wont Run Assigned Macro

Dec 3, 2006

I created an object using multiple smaller objects (shapes, text etc,) and grouped them to make an icon. I assigned a macro to the finished object. It works fine when the sheet is unprotected. However, when the sheet is protected, the macro will run only when certain parts of the object are clicked. The standard cursor turns into the "hand" when any part of the object is touched regardless of the protection status.

View 8 Replies View Related

Macro To Shift Rows Up And Down

Oct 12, 2011

how to write a macro where I can select a row or rows (adjacent) press a button, and the secelected row(s) will shift down one row every time the button is pressed. I also need another button with a macro that shifts the row(s) up one row at a time. The following code works for shifting selected row(s) up, but I can't figure out how to shift multiple rows down a row at a time.

Code:

Sub RowUp()
Selection.EntireRow.Cut
Selection.Offset(-1, 0).Insert Shift:=xlDown
Selection.Offset(-1, 0).Select
End Sub

View 8 Replies View Related

Collapse All Levels In Pivot Table

Sep 9, 2010

I created a PivotTable that works fine. A user can click on an option and the subcategories expand; then he can choose one of those and a new group opens, etc., going 4 or 5 levels deep in options.

What I need to do is: If he then wants to start over and choose another option in the initial level, I want all of the subcategories to reset to their original closed state (unexpanded). As it is now, when he goes back to the original choice, that is closed, but everything inside it is still open as he had selected them previously.

View 6 Replies View Related

Trapping Outline Expand / Collapse

May 15, 2009

I suspect I need a class module for this...

How do I trap the event when a user chooses to expand / collapse outlines (columns in this instance) on a worksheet?

Basicallly, when attempting to expand I want to prompt the user to enter a password and then unprotect the sheet. And if collapsing to prompt again and then protect the sheet. I have this bit covered, just not sure how to trap the event.

View 9 Replies View Related

Delete Row Macro (shift Cells Up Then)

Jul 1, 2007

I am looking for a macro that can delete whole rows (shift cells up then). How i would like it to perform is if there is nothing in cell(s) B then delete the whole row?

View 9 Replies View Related

Insert-shift Cells Down Macro

Jan 29, 2009

I want to be able to insert-shift cells down based on criteria in another cell. For instance, I would like a macro that would look at column B for saturday and sunday and then insert-shift cells down on the corresponding cells in column D...

View 9 Replies View Related

VBA Code - Expand / Collapse Grouped Columns

Feb 10, 2014

Currently, Columns EFG are grouped.

I have a userform with checkboxes. With the click of check box, i would like for it to do the following.

If checked, it will expand the group. If unchecked, it needs to stay collapsed.

Here is an example of code i currently have and is not working.

[Code] ......

View 2 Replies View Related

Double Click To Collapse A Set Number Of Rows

Mar 18, 2014

I am trying to build a worksheet which has an account number in column B with several more rows of content starting in column C and beyond. I would like to be able to hide the 9 rows under the row with the account number by double clicking on the account number. I found this code which will work by collapsing to the next account number, but it collapses the account number underneath it too. Is there a way to collapse only the blank cells in the column until the next number or to program the code to only collapse/hide the next 9 rows below the double clicked cell?

View 2 Replies View Related

Code To Conditionally Expand Or Collapse Only Certain Grouped Rows

May 13, 2011

I have several groupings of rows in worksheet. I need to have each separate grouping be able to automatically expand or collapse based on a value in each group.

ie-
Grouping Rows 11-15
Grouping Rows 21-25
Grouping Rows 31-36

If cell values in A10, A20, or A30 = 1, then the grouping below it would need to be collapsed, and if not, then expanded.

View 3 Replies View Related







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