format cells in vba

  1. C

    VBA Format Cells Based On Data

    Greetings! I'm a real newbie to VBA and I have been stumped by this formatting of cells. I have Excel files (lists for gages due calibration) that we post for production. These lists are Excel files generated daily by our gage management software. I have a macro that opens each file and...
  2. K

    Pivot table selective format

    Hi I have a pivot table with just 2 columns. The Data set, about 50k+ rows, is also the source for other tables. Column 1 is a component Part No. while Column 2 is a list of products in which this component is used. Setting up the table was no problem. Both columns are "Row Labels". The...
  3. T

    VBA to change cell value based on multiple conditions

    Hey, I'm looking for some help with this I would like to set the value of any cell in column D to "Yellow789" where that rows column A value begins with (but may contain much more than) "red123", column B value contains (but may not begin or end with) "blue456", and Column C value is blank...
  4. R

    Macro to format cells from one worksheet to another

    I have written a VBA that will format a cell in one worksheet based on the value of a cell in another worksheet. It works fine. My question is this: I have 312 cells to format. Each cell on the main worksheet looks to a different cell on the other worksheet. Is there an easier way than to...
  5. M

    Select the used column range when in a Case Clause

    Okay I am having a bit of a creativity/brain freeze issue here :stickouttounge: and cannot come up with a simple solution to really capture the used range on a column. At the moment I am selecting up to the next blank cell and I need to capture the used range. I simply want to change the format...
  6. B

    VBA help - to apply conditional format

    I need some help making modifications to vba that applies conditional formats to one of my reports. The existing macro creates a conditional format and copies the format over the entire report. The vba I use creates a conditional format on cell $A8 and bolds the cell if it starts with " ["...
  7. H

    Change date in a OLAP Cube based pivot table

    I have had posted a similar issue earlier, but it did not solve my problem. Therefore, I try again. My Pivot table gets data from a OLAP Cube. Using the macrorecorder i got this code by setting a new date in the filter and then update the Pivot table. I can manually change the date and it will...
  8. B

    How to assign the format of adjacent column to the last column in excel using VBA

    Hi, I have added a new column as the last column to an existing excel using VBA. After adding a new column, though the background color and other format properties same as that of the adjacent column are applied to the column that I inserted, the grid lines it did not copy the same grid borders...
  9. E

    Date Formatting checks

    Hi, I am trying to set up some VBA validation on an Excel 2007 sheet, and I do not want to rely upon the NumberFormat field, in case the user has pasted into the field. How do I check that a date is in the correct format (e.g. "dd/mm/yyyy hh:mm:ss") without using the NumberFormat function ? Any...
  10. T

    VBA to format font color in a hyperlinked cell if selected

    Good afternoon, I need help with a simple macro to change the font color in a hyperlinked cell after it has been selected. This way the cell would indicate that it has already been selected. I have many sheets with hyperlinks and would like it to only work on "Sheet 1" for example. Thanks so...
  11. L

    VBA - Date format problem

    I have 2 macros that use the same code to rename a sheet and a new workbook using a date format string but it is now throwing a wobbly after working for nearly 18 months. Error message comes up that it can't compile as it cannot find project or library. I checked the VBA library and the Format...
  12. M

    VBA to Format Column or Cell Range to convert text 1234 to hh:mm 12:34 - and how to handle if its am/pm

    I need serious help - I am trying to set up a spreadsheet so that when a user enters the time from an employees time sheet they can 10-key it in without having to enter the colon or AM / PM. I have this code below - when I enter "130" in cell I get 01:30 AM - can I get this to default to PM ...

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