Any tips on cleaning this up to make it run a bit quicker?
I've done all the tips i know, which is basically shutting off calculations, screen updating, etc. until the end.
There is a lot of selecting and formatting but every time i try to mess with it, it breaks it.
Thanks in advance!
Sub...
Hello,
I am using the code posted below to remove the center border from an already selected group of cells. It works perfectly, but it then also removes the white background color in the selected cells. I have tried several different codes that I found online (ie cell.interior.color =...
Hi all,
I am really struggling to use VBA to automatically add borders - see below:
Data is always from column A to S but varies in length
Task 1 - Add an extra think border around the whole worksheet (Code is below)
So essentially I just need a way of selecting all the cells from A1 to the...
Hi all,
My goal is to automate a Structure/organizational chart with different elements included in a listbox (userform)
here is my current code on VBA of the command button which display on a excel sheet all the items of the listbox of my userform.
Dim i As Long
For i = 0 To...
when the file is downloaded it always has a random name that begins with "report...….." the numbers part is random. I am trying to modify the code so that it will work no matter the name of the file and worksheet.
see code below:
Option Explicit
Sub MORE_ReportFormatter()
'
'...
Hello,
It's AGES since used any macros and even then I only really recorded them and tweaked them. I'm trying to create a macro that formats some data. However when I run it I end up with a completely blank sheet except for a bit of writing and thick box borders - all the data that was in the...
Hello I am new to the site and hoping someone can help me.
I have large data set that feeds in to a pivot table for multiple categories which then needs to be split on to separate worksheets and formatted. I am a novice when it comes to VBA so have recorded a macro and replicated it for each...
hi,
does anyone have the vb to only box col\rows that contain text?
at present i use:-
Sub boarder()'
' boarder Macro
'
'
Range("A1:F2663").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With...
Happy Thanksgiving All,
I have a macro that creates a sheet (below). Now that everything else is working, it seems to be failing when making the the sheet. Error is a "Global_Object failed and it's highlighting the "If Not Intersect(Target, Range("R5,W25")) Is Nothing Then" line. That first...
Greetings everyone!
I'm working on a macro to do my daily copying/pasting for me. It works by copying data from a daily updated PivotTable and pasting it in the correct sheet/cell location.
Here's a picture of my table just to give you an idea of how my data is set up...
I have a script that I have used for years with Excel 2000 for conditional formatting since in that version you were limited to 3 choices. On one of the computers we updated to Excel 2016 and the script no longer works. If you type a letter in a cell, for instance F or f, the script will...
Hey guys-
I have a sheet, probably excessively long based on my newness to VBA, that is adding an extra sheet instead of just the "Noon" it's supposed to....maybe someone spots an error I can't find.
Thanks!
Sub AddNoonSheet()'Speeds up the formating part
Application.DisplayAlerts =...
I am trying to format subtotal rows ( which are in column f) with a loop and I am doing something wrong. I want the macro to outline and fill in colour for the subtotal row (Columns A to P):
''Define last row in worksheet using column F
Dim Previous As Worksheet
Set Previous =...
Hi All,
Quick question I'm hoping someone can point me in the right direction with. I'm basically attempting to format all the tabs in a workbook excluding the first two tabs, named 'template' and 'error log'. I've done the following code, however when I run the macro it proceeds to format...
Hi, a member in another thread just helped me out with the below code and it now works great.
The code/macro is run when a 'Form Control Button' is clicked in the active sheet.
Could someone please help me with adding a password setup and where to place it in my code:
Password Box: "Please...
Hi, could anyone please help me with the below code (Format_Sort_PSA_TL):
It is a recorded sequence of multiple formatting, print setup and sort events.
Recorded in one worksheet only named 'Booking.'
Executed by clicking a 'Form Control Button' within 'Booking' worksheet.
Works as...
Hi all,
I got a Excel file that contains all my reports that are on the same tab one after the other. Each report has his own personalize print layout (different paper size, some are on one page, others are separated on two pages, etc.)
Some report became so big after some time, that I need...
Hi,
I currently have the code below in use.
Private Sub CommandButton1_Click()Dim CustomerName As String
Worksheets("DATABASE").Select
CustomerName = Range("A6")
Worksheets("INFO").Select
Worksheets("INFO").Range("CF2:CI2").Select
If Worksheets("INFO").Range("CF2").Offset(1, 0) <> "" Then...
Hello! I am getting an "Else without If" error message on the following code. How can I make it recognize the Else for the second If statement? Thanks!
(The purpose of the macro is to format a column or set of columns in a pivot table, beginning on row 4, based on how many data points there...
I am trying to ensure that a worksheet always has the formatted view I desire. So I did the "Record Macro" and I run it when I need to correct the view. But it is very slow.
is there a more efficient [quicker] way todo this?
' Format
Cells.Select
Selection.Hyperlinks.Delete...
We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel
Which adblocker are you using?
Disable AdBlock
Follow these easy steps to disable AdBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the icon in the browser’s toolbar. 2)Click on the "Pause on this site" option.
Go back
Disable AdBlock Plus
Follow these easy steps to disable AdBlock Plus
1)Click on the icon in the browser’s toolbar. 2)Click on the toggle to disable it for "mrexcel.com".
Go back
Disable uBlock Origin
Follow these easy steps to disable uBlock Origin
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.
Go back
Disable uBlock
Follow these easy steps to disable uBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.