Deleting a pivot table in Excel; no gridlines remaining - excel

I've deleted a pivot table in code by first selecting it, and then pressing delete. The area that the pivot table occupied is now not displaying gridlines. All other cells in this sheet are displaying gridlines. I have googled this problem, and several suggestions have been mooted in response to similar questions. These include:
Navigate to Page Layout tab, and click on View Gridlines.
Navigate to File / Options / Advanced, and ensure Gridline Colour is set to Automatic.
Select the affected cells, and click Ctrl+1 to format the cells. Go to the Border tab and ensure that none of the borders are active.
Select the affected cells, navigate to Home tab on the ribbon, and set the Colour Fill option to No Fill.
Ensure that there is no conditional formatting on the spreadsheet.
None of the above work. However, if I copy and paste a cell from an unaffected area of the spreadsheet to the affected area, the gridlines then become visible. This is not an ideal solution though.
Can anyone help?
I can't seem to attach a version of the spreadsheet to this post.

A cell does (simplified) contain a content and a format. By using ENTF key you clear content. If you want to delete both there is two ways:
By VBA:
You need to clear Formats on the range as follows:
Range("your Range").ClearFormats
The format remains because you have used clearContents by just deleting
Use Range("Your Range").Clear to delete both content and format
Without VBA:
See the picture below and select ClearALL in the Menu

Select the area where your PivotTable used to be, and then go to "Home" > "Editing" > "Clear" ([Alt],[H],[E],[A])
You have deleted the contents of cells, but not the cells themselves, not the special PivotTable formatting.

Related

How do I hide or remove the resizing handle in the last, or bottom-right, cell of an Excel table?

Is it possible to hide or remove the resizing handle in the bottom-right cell of an Excel table? I've tried various property settings, turned the total row on and off, etc.
One way to hide the table's resizing handle is by protecting the sheet.

Hide checkboxes when hiding rows

I have used VBA code to hide some rows. These rows are hidden when I click a check box.
The problem I have now is - the check boxes associated with each row will not hide. This also interferes with my original VBA code to hide the rows and stops working. I would like to hide these check boxes with the rows.
Please can you advise?
You need to set the checkboxes to "Move and Size With Cells." The last time I did this, with Excel 2003 it was easy: just right-click, choose "Properties" and choose that option. Now if you try that you'll see the option, but it's disabled:
So instead you need to access the more modern-looking format menu in Excel 2007 onwards. I did it by clicking the little "more" arrow on the Drawing Tools tab's Format group. For some reason it's enabled there. Once you set it your checkbox will hide with its row:

Is it possible to add a logo or other picture in an Excel sheet and lock its position on the sheet?

I am looking for a way to add a logo or other picture in an Excel sheet and lock its position on the sheet, so that the user won't get annoyed if he happen to grab it while using.
I tried locking cells, sheet, but nothing seems to work.
I am using Excel 2007.
Not really a programming question but the way to do this is...
Right click the image and choose Size and Properties.
Click Properties tab and under properties,(optional- choose Don't move or size with cells) and ensure the Locked box is checked.
Highlight the cells of the worksheet you want the users to be able to edit, right click inside one of them and choose Format Cells. In the protection tab uncheck the locked checkbox.
Then you can protect the worksheet. Click Home, then Format, then Protect Sheet.
Make sure you unselect Select locked cells, leave the top checkbox selected (Protect worksheet and contents of locked cells) as well as select unlocked cells checked.

ActiveX controls move when pushing XML data into Excel Table

I am pushing XML data into an Excel Table via C#, but when I do this, my ActiveX checkboxes lower on the page do not adjust their position. The spreadsheet rows move down, but the checkboxes do not.
Also, at times it seems like even though the cells on the spreadsheet shift down, the row heights do not, messing up the formatting.
I tried messing around with the properties of the checkboxes, but still got the same behavior.
Thanks.
have you set "Format Control / Properties" of your CheckBoxes to either "Move and size with cells" or "Move but don't size with cells"?
When you insert full rows the controls will move down.
When you just insert cell ranges with option "Shift cells down" you must ensure that the cell range boundaries (left/right) are wider than the space occupied by the controls (checkboxes including caption), as the control will be shifted down only in this case. So make your cell range larger or the Checkbox smaller.
Hope that helps - good luck - MikeD

How to get rid of black arrowheads in right bottom corner of excel cell?

I have a file with Excel 97-2003 (.xls) version. When this file is opened in Excel 2013, shows black arrowheads in right bottom corner of the cell. These arrows are only in cells B3:J3 and F4. All these cells contains integer numbers. To get an idea what I want to convey please have a look at following image.
Things i have tried to remove arrowheads
Clear content and insert data again. (Arrow head is still there even if I remove data.)
Clear formatting.
Use Format painter and format the cells having arrowhead with the format of cells not having arrowhead.
Deleting the cells. (If I delete the cells, these arrows get shifted to cells above it)
Removing the conditional formatting from these cells.
Interesting thing is when I try to print the sheets the arrowheads vanish in print preview. I want to get rid of the black arrowheads (or triangles) in the excel sheet.
Thanks in advance... :)
Edit:
Things i have tried to remove arrowheads in addition to above mentioned
"Remove Arrows" from "Formulas" tab
In the 'home' tab on the ribbon, click 'select & find', then 'selection pane'.
If there is anything in this pane, select and delete it and that will probably remove the arrows.
Also, in the 'Formulas' tab in the ribbon, click 'Remove arrows'
Function Key and F5 at the same time in the cell in which the black arrowhead appears.
Click on Special.
Click on Objects.
A gray circle will appear.
Hit the delete key
and the black arrowhead will disappear

Resources