xlcontinuous

  1. P

    Using Lastrow

    I’m trying to learn to write a sub without having to continuously repeat the Range on every line of code by using the command Lastrow. Below is a simple example of a Range A1:H15. <!--[if gte mso 9]><xml> <o:OfficeDocumentSettings> <o:AllowPNG/> </o:OfficeDocumentSettings>...
  2. 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...
  3. I

    Advice for existing code where todays month is entered to a cell

    Morning, I am currently using this code supplied below but i overlooked something when i was applying the code etc. The code takes the current month and enters it into cell B1 on several worksheets within the same workbook. The part i overlooked was that on the 1st day of the month when i...
  4. 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 =...
  5. 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...
  6. I

    Can you check my code please

    Hi, The code is supplied below, All was working spot on until the code in Red was added. Basically i recorded a macro and took the coede from there and placed it here. What is hould do is the following. Range A4:E30 add All borders "thats it" But whilst you are there i would like to also add the...
  7. H

    Adjustin code: fill color and border

    I have the following code to which I need help adjusting it to fit my needs. I need it for the fill in color to go from C3-G3 but as far down as there is data in column A. The same with the border from C3-G3 but as far down as there is data in column A. If possible i would like to extend up to...
  8. G

    Select a range plus 1 cell.

    Hi All, Hopefully a very simple question. I have a part of a larger macro that selects a range and then draws a box around it. I would like to extend the range that the box is drawn around by one cell at the bottom. I've fiddled with it unsuccessfully. Code below. Thanks for your help...
  9. D

    Automate Structure/organizational chart

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

    Excel VBA not recognizing value of cell

    Vba does recognize when the cell value changes in B7 to R7 because I pull cell value from another worksheet. it only works if I change the cell directly. any suggestions. Private Sub Worksheet_Change(ByVal Target As Range) If Target.Cells.Count > 1 Then Exit Sub Dim rng As Range Set rng =...
  11. 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() ' '...
  12. M

    VBA for thick cell border

    I havea column that need to apply thick border around individual cell if cell fromanother column (same row) meets criteria. Column K row 6 and below is thecolumn need to apply thick borer to. Column BK row 6 and below is the column itneeds to check if it contains specific content. example: if...
  13. S

    Workbook Sheet_Change Loop

    I have a worksheet_Change item that is supposed to insert a timestamp (upper piece of code) and change two cells (R6 on one sheet, R9 on the rest) based on the value of another cell/sheet. Well here's the issue- this seems to be looping so, for example, the one piece of code continually...
  14. S

    Workbook Sheet_Change Producing Error

    So I the code below should input a timestamp in cell F4 on the sheets within the workbook (except those 3 excluded in the beginning). Well running the sheet, I'm getting an error and it highlights the line in red below. Ideas? Originally "F4" on the activesheet was locked and I set it to be an...
  15. 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...
  16. S

    Conditional Formatting to the Pivot Field instead of Selecting Cells

    I'm trying to apply a formatting condition to a pivot field, the script below does that but applies Formatting to "Selected Cells" of the Pivot Filed and makes it a static cells range, instead of Pivot Field Values of the pivot table, where as the same can be done manually. <code style="margin...
  17. T

    VBA Copying/Pasting Data from PivotTable Macro

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

    Error 1004 "Application-defined or Object-defined error"

    Good morning, I am running the following macro. it works perfect until the last line (in bold). It is generating an error. What am I missing? ============================================================== With ActiveSheet For xxx = 12 To (InvoiceStartingRow + 1)...
  19. 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...
  20. I

    Border style advice please

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

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