.linestyle

  1. F

    Macro moving all columns over 15 columns

    i am trying to add two columns to an existing template and adding some formatting. i am inserting a new column after A (so a new B) and a new column after M (so a new column N) So the report initially ranged from A:N and once the new columns are inserted it should range from A:P Well, once i...
  2. O

    Help with VBA for background color in selected cells.

    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 =...
  3. B

    Calculate Correction Rate from Pivot Table

    Hi All I am really having a hard time computing the correction rate from a pivot table. Correction Rate is computed by adding up NA,Within 1 Day, Within 3 days and within 5 days divided by the Grand Total. However, if I have uncorrected items, my codes dont work. Uncorrected shows up in column...
  4. T

    VBA To Format Border Lines

    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...
  5. G

    modify vba code so it works no matter what the name of the file is

    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() ' '...
  6. Trevor3007

    box all columns and rows

    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...
  7. S

    Intersect Failing

    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...
  8. jo15765

    VBA To Add Borders

    Greetings - this works, but is more of an optimization question. I am wanting to add borders (all) around my selected range. Is there a shorter way to write this code? This is what the Macro Recorder created Range("A1:" & colName & lRow).Select Selection.Borders(xlDiagonalDown).LineStyle...
  9. S

    Adding Password to Module

    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...
  10. S

    Executing a recorded macro from any selected worksheet.

    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...
  11. L

    VBA code so that after each page break, Excel adds a line when printing

    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...
  12. R

    Else without If error

    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...
  13. I

    Making a recorded macro code simple

    Hi, Please can you assist to make this recorded macro much more of a simple looking code. Range("F16").Select Selection.Borders(xlDiagonalDown).LineStyle = xlNone Selection.Borders(xlDiagonalUp).LineStyle = xlNone With Selection.Borders(xlEdgeLeft) .LineStyle =...
  14. M

    VBA To Find Last Row & Cell, Select Additional Columns, Format and Sort

    Hello, I am working on a project that will have a variable range of rows that I will need to sort the data and format the entire range. Columns B-G will always have data in them, but I need to be able to sort columns A-I, regardless of data included in columns A, H, & I. Now, using the macro...
  15. C

    Tidying my Macro

    Hi Guys, I have a range from I10:O99, which needs formatting, prior printing. The formats include : Borders Font Verdana / Size 12 Font Colour - Black or Red - Which I can change later Align Horizontal - Left Align Vertical - Centre Row height = 30 Column width = 12 I have done it using a...
  16. P

    Hyperlinking in Excel 2016

    Hello! I have a VBA code which was built in 2006, worked in 2016, and broke in 2017 when we updated to Excel 2016. For the life of me, I cannot find the issue. This code is designed to link from excel file 1, copy information from excel file 2, and paste it to a worksheet in excel file 1 with...
  17. J

    Run-time error'91: Object variable to With block variable not set

    Hi, I am very elementary when it comes to creating macros and code. I have a macro that was given to me to run on data that I exported from an application with only certain columns. This macro is supposed to format the data as needed for meetings. I am trying to run the macro and getting the...
  18. R

    Auto Format Dynamic Range on Dynamic Sheets on Workbook Open

    I'm trying to auto format the data in a dynamic range, on a dynamic count of sheets, when the workbook opens. Essentially, every sheet not named "Variables" or "Financials" where there is data in any sequential row. I'm using this code, but it's not hitting all of the sheets. What am I...
  19. B

    Dynamic Worksheet Name

    Hello, I am trying to create a dynamic worksheet name in my dynamic range borders macro. I got the range borders to be dynamic but now I am struggling with creating a dynamic worksheet name that I do not have to change for each report I run. This is the code I have: Sub DynamicRangeBorders()...
  20. O

    VBA to conditional format borders

    Hi, I've been looking for a VBA code to format borders with conditions. I searched on the internet but I only found results for conditional formatting. I know I can use conditional formatting, but I don't want to because conditional formatting tends to mess up when we move or delete rows, so...

We've detected that you are using an adblocker.

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.
Go back
Back
Top