xlnone

  1. P

    VBA Entering If statement

    This one is beating me..... I have a macro on the sheet where anytime a change is made, it enters this sub. That sub works perfectly. The sub below is my problem. The sub below is highlighting cells with ColorIndex = xlNone with ColorIndex = 42 I cannot figure out why it is entering that If...
  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. willow1985

    Macro freezes excel workbook when executed via shortcut (button) but runs fine from VB

    I have the below code. It used to work fine but suddenly when I run it it will start to run fine but at the end it will display the message box "update complete" but the entire workbook is frozen and grayed out/parts of text everywhere etc. However the macro works fine if I run it straight from...
  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. J

    Help condensing snippet of simple code

    Hi all, As noted on earlier post this week, I'm just starting out with VBA. When I used the recorder to remove all border lines it spits this code below. Seems really long? I want to learn the smartest/most concise code I can from the get go so I don't start with bad habits...
  6. D

    VBA with sumif syntax issues

    Hello I did my best to post using everything suggested but this is the best I can do. Here is a spreadsheet I am trying to work with. It is basically up to 200 rows and using columns A:H. I am also attaching my vba code. The code will add titles, formatting and some formulas. I am having...
  7. S

    Copy matching data between workbooks

    Hello, I have written a function that finds data in one sheet and moves it to a new workbook. Typically, I google stuff like this but I've picked up enough now that I wrote this one myself (except the formatting at the end, I recorded a macro and stole the code for that part). The issue is it...
  8. R

    Please help edit this code.

    I use this code to erase highlighted cells after a search. Is there a way to edit this that would put the original cell color back in,maybe looking at near by cell. Thanks Sub Remove_Color() Application.FindFormat.Interior.Color = vbYellow Application.ReplaceFormat.Interior.ColorIndex =...
  9. D

    How to merge 2 codes that do the same thing for 2 separate cells into 1 code?

    Hi, Please could someone help me? I have this following 2 codes that works fine but I was wondering how it can be made into 1 code? Cells(Rows.Count, "A").End(xlUp).Select Selection.ClearComments With Selection.Interior .Pattern = xlNone .TintAndShade = 0...
  10. J

    Macro deleting all my data!

    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...
  11. 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...
  12. 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...
  13. T

    Format on Double Click Macro

    Hello All, My VBA is pretty weak, what I have is a conglomarate of on double click examples I found online that I have attempted to edit for my data set, and the addition of some code coppied from record macros to get formating values. Honestly, I am not sure if I am one letter off or 5 miles...
  14. O

    Using LastRow and Borders

    First off, thanks for the help. I am using LastRow to find the last row of data in my spreadsheet. The last row in my spreadsheet varies daily. Dim LastRow As Long Range("A1").Select LastRow = Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row Then I am...
  15. C

    Find new range

    Hi all In range A3:S33, I use this code to highlight a row. Dim row As Long, column As Long row = ActiveCell.row column = ActiveCell.column If row < 3 Or row > 33 Or column > 19 Then Range("A3:S33").Interior.ColorIndex = xlNone Exit Sub Else Range("A3:S33").Interior.ColorIndex =...
  16. W

    Better way to do this?

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

    Macro not completing to end of data

    Hello, I have a code below that will find changes in column J and will insert a blank row after the change. My issue is that when I continue with the rest of the code, it will leave the last row as blank instead of adding a footer with the header and formatting needed. I have data in columns...
  18. V

    Stuck on macro - need to save as originalfilename.xls not name of file that holds macro

    Hi there First time post so please bear with me if I'm not using the correct terminology. I have a large number of .csv workbooks that need to have columns hidden, a new column added, further info added, columns locked and then save as .xls file. I recorded a macro on the first workbook and it...
  19. C

    Conditional Formatting Based on Active Cell

    Hello all, I have some code that I use to highlight the first column and row of the active cell I'm in to make it easier to see. Then when I click out of that cell it removes the highlighted that it had added and highlights the new location. The code is baked into the tab itself by right...
  20. S

    The object invoked has disconnected from its clients

    Hopefully an easy one. This is a code that seems to work most of the time, but will randomly throw up the error in the title. Code is below. It gives the error at the Selection.Insert Shift:=xlToRight line. I'm in Excel 2016, I can only image that's what is causing this, but I'm not an expert...

Some videos you may like

This Week's Hot Topics

Top