.tintandshade

  1. E

    Selecting the Last Row in multiple columns

    Hi, I am using the below formula to select cells for conditional formatting: Range("A2:A45,F2:F45").Select Selection.FormatConditions.Add Type:=xlExpression, Formula1:="=$B2=$F2" Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority With...
  2. 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...
  3. 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...
  4. S

    VBA Help - Conditonal Formatting dynamic Range Comparing other cell values

    Good afternoon, I am working on a macro for tracking training dates and notifying the user when training needs to be scheduled. Currently I have my macro doing the following conditions: -Determines the last row used in the worksheet to know the range to apply the formats to -Apply the...
  5. S

    coding mysteriously adding new sheet

    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 =...
  6. A

    Changing Cell Color Based on Cell Value VBA

    Hi All, I'm having a difficult time getting this piece of code to work. For a variety of reasons I can't use conditional formatting. My problem: Each cell has a different value: GREEN GREENAMBER AMBERGREEN AMBER AMBERRED REDAMBER RED I simply want something that if the cell says "RED"...
  7. S

    Fomratting Subtotals Rows

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

    Macro to format all tabs excluding two - not working! help!??!

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

    Add an "or" command to vba

    Hi, I have a macro that conditional formats a cell depending on the country it contains. What I need though is a way so that a particular colour scheme can apply to more than one country. So basically if A1 = "Sweden" "TRUE "FALSE" can become if A1= "Sweden" or "Ukraine" or "Barbados" "TRUE...
  10. 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...
  11. E

    Conditional Formatting VBA

    Hello all, I am having an issue with the Formula1:= I would like my conditional formatting to be dynamic. this code will be connected to a macro where it will repeat the conditional formatting however may times the user wants along a series of columns. if this code starts at b9, and a...
  12. 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...
  13. 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...
  14. 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...
  15. S

    Conditional formating Macro help

    Please can some one help, I've made a macro to highlight groups of numbers, in columns, but when i run the macro it affects all columns ??? 'Colour codes for uncovered duties Sunday Columns("U:U").Select Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlBetween, _...
  16. 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 =...
  17. 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...
  18. W

    hyperlink

    I am running the macro below automatically at opening the workbook so It always looks the same. But when I delete the hyperlinks it changes the cell color if a hyperlink was there. Doing so manually via the mouse does not. I would like to preserve the cell colors. any ideas...
  19. F

    VBA code for selecting a row based on text and using conditional formatting

    Hello, I'm trying to add a snippet of VBA code to a macro I've created. I want to select a row (the row # will vary, so I can't use that in the code) that contains a specific string of text from column A ("Total Unapproved Indirect Labor"), and then run conditional formatting to highlight...
  20. X

    Conditional formatting by VBA

    Hi All I am applying some Conditional formatting by VBA to both the same selection and different selections. As most of the code is the same every time, I was hoping to be able to shorten the existing code: Sub Status_CF() 'Status = U Range("I2:I1048576").Select...

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