Excel 2007 :: Running Second Macro Causes Formatting To Be Lost
Feb 3, 2013
Running Windows 7, Office/Excel 2007
I have a macro which performs some conditional formatting on a worksheet. Based on the value in cells in one column, if the value meets the criteria some simple formatting is performed (row is colored, font changes for that row etc).
The macro then calls a second macro which performs the same evaluation on the same cells from the same column. If the value meets the criteria (same as previously) it is supposed to change the value of the cell by 1/2.
Both macros work, however the 2nd macro also seems to remove all of the formatting, font changes, coloring etc that occurred from the first macro. I have had the first macro save the active workbook and close and have the 2nd macro re-open the file but it sill overwrites the formatting. If I do not have the 2nd macro run the format changes are saved. I have tried saving the file after the first macro runs with .xls and .xlsx extension and no luck.
View 3 Replies
ADVERTISEMENT
Jul 16, 2014
I have a text file that I need to open in MS Excel 2007. The file contains the following data. (Each column is delimited by the "|" character.)
Part #|Inventory ID
1743|213,221
1864|10,40
1948|1170,1180
5265|100,104,107,10004
Ultimately, I need three columns but the data needs to look the same as it did before I opened the file.
When I open the file for the first time, I use “Text to Columns” to delimit the fields by the "|" character. The problem is that the Inventory IDs in the middle column get a bit whacky.
Here's what I'm left with:
Part # Inventory ID
1743 213,221
1864 10,40
1948 11,701,180
5265 10,010,410,710,004
The comma is retained appropriately when there are two 2- or 3-digit Inventory IDs.
When a row has multiple, longer Inventory IDs or Inventory IDs that vary in length, the comma is moved to every 3rd decimal place.
I tried putting quotation marks around the data before I opened the text file for the first time but that didn’t do anything. I tried Custom Formatting to retain the comma position (0000,0000) but this only worked when I had two 4 digit IDs. I also changed the number type to Text and General. Once the comma was changed, I couldn’t figure out how to get it back.
How to best retain the format of my Inventory IDs.
View 6 Replies
View Related
Jun 5, 2014
I have a summary sheet using a macro to summarise multiple other worksheets. However, when I run the macro, the summary sheet loses all formatting.
For example, in one column of the "target" worksheets, the data is entered on multiple lines within a single cell, using alt+shift. When I run the macro the formatting is lost and the data in this specific range is displayed in one long row in a single cell. Also, font formatting is also lost.
In the attached example, the top row shows the original formatting on the "target" worksheet, but below that is the formatting after the macro has run and this is what shows on the summary.
I need it to be formatted as on the original if possible.
View 5 Replies
View Related
Mar 13, 2008
I have a macro with "ActiveWorkbook.Protect Password:="password"" . It was working fine in excel 2003. In excel 2007, because of this I am not able to run any macro's in the workbook. I am getting a message "The macro may not be available in this workbook or all macros may be disabled. I can see a security warning in message bar saying macros have been disabled, but I dont have have a option to enable the macros.
View 9 Replies
View Related
Aug 9, 2012
I am getting a "Run time error 5", "invalid procedure call or arguement" when I run a macro on a PC other tha the one on which it was created.
In this case both PC's are running on the version 2007 of Excel.
This is the highlighted statement when the macro fails
Code:
ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
"SOCX25!R1C1:R" & Lr & "C23", Version:=xlPivotTableVersion14).CreatePivotTable _
TableDestination:="SOCX25!R7C25", TableName:="PivotTable1", DefaultVersion _
:=xlPivotTableVersion14
View 4 Replies
View Related
Mar 17, 2009
I'm having a problem with named ranges in a chart. I'm using Excel 2007 in Windows XP.
I have a line graph with twenty different series all using dynamic ranges. I created each series individually, typing the name and then the dynamic range I had previously defined. As far as I am aware, Excel demands when writing the reference that you specify which sheet/workbook this named range is from, so, given the scopes of my ranges are all 'workbook', I added the name of the workbook to the references.
e.g.
Series name:
Series1
Series values:
='workbook name'!range1
This seems to work fine, but when I save and then re-open the file, the dynamic ranges no longer work. If I go to Select Data and look at the reference for a series, it has been changed thus:
Series values:
=[0]!range1
View 2 Replies
View Related
Jul 9, 2012
I would like to keep an average for 12 months.Each number entered for a month would be averaged with the total months with an entry until all 12 months had entries. I am using excel 2007
View 9 Replies
View Related
Jan 15, 2014
how to make a % of running total in pivot tables in excel 2007. the running total in is only available not the "%".
View 1 Replies
View Related
Jan 27, 2012
Using Excel 2007. Is there a straightforward way to do a waterfall chart?
eg. stacked bars running from left to right.
First Column = 2011 Headcount
2nd Column = stacked bar with additions (by category) - stepping up from the 2011 total.
3rd Column = stacked bar with reductions (by category) - steppind down from the first column + 2nd colum total.
4th column = 2011 exit (which will be at the same height as the bottom of the 3rd column).
View 3 Replies
View Related
Nov 9, 2008
I have a workbook that is used by others and has been working reasonably well for several years. The users are youngsters who tend to play with it when a bit bored but I usually manage to put things right. They seem to have done something special this time.
The formatting for dates, time and money has gone and I cannot correct it. I have tried the usual formatting of cells, painting formats from other sheets, copying and pasting formats all to no avail. The whole sheet is effected so that new entries appear the same way although the correct format appears in the formula bar.
I don't know if this is relevant but the sheet relies on VBA form inputs. The code is password protected and only I know the password.
The PC is not connect to the internet or a network so I have ruled out a virus. (As far as I know, no floppies or USB sticks have been used on it either.)
View 14 Replies
View Related
Nov 7, 2012
I have a three sheet workbook that I created
The first sheet is virtually blank it allows the user to cut and paste dispatch info, and customer info from Lotus Notes Dispatching which is then referenced to auto populate appropriate cells in Service Report(third sheet)
The second sheet uses significant conditional formatting to aid the user in entering data in a very easy to use straight down vertical manner.
There are 74 rows of data entered followed by several comment areas which all also auto populate to the third sheet(service report).
Issues I am having, I only want the third sheet (service report) to print, but I want all conditional formatting to be visible to the user.
At one point I put all three portions on a single sheet and set print range to exclude that which I don't want printed but then all formatting is masked and cells are just gray.
I would prefer to have the three sheets remain separate and to only print the third sheet, but need conditional formatting to remain functional and visible.
View 6 Replies
View Related
Jul 30, 2007
I am running office 2007. I am using conditional formatting in a pivot table to highlight rows where the value in the last column meets a particular criterion. However everytime I update the table the formatting gets lost. I have looked through all the threads I can find to establish if there is some VBA code that I can use to reapply the required conditional formatting after each update
View 2 Replies
View Related
Oct 13, 2008
I have someone in the company that I work for that is using Excel 2007 in compatibility mode, that is trying to make changes to an Excel 2003 file.
The file in question is a large one. She can type in the rows and columns and anything that she types will save. However if she trys to make any changes to the file in terms on calculations or highlighting specific columns, then these changes are not saved.
I have found out though that if she saves this 2003 file in the 2007 format, then all over her changes will save. She can't save it in the 2007 format due to some people still on 2003 that edit this file as well.
View 10 Replies
View Related
Sep 20, 2011
I'm trying to clear conditional formatting (icon set) that I was experimenting with, but no joy at all. The only function within the "Styles" section is Cell Styles -- conditional formatting & fornat as table choices are grayed-out.
I've tried to delete and re-enter the data, clear formats, clear all, copy and paste, format painter...nothing worked.
View 4 Replies
View Related
Mar 13, 2012
I have this code
Code:
MsgBox Format(1267.5, "Currency")
I see the following as output on MS e ?1,267.50
I was expecting a currency symbol instead of ?. Not sure if i need to change some setting in excel.
View 3 Replies
View Related
Nov 7, 2013
I am using Excel 2007 and am having some trouble formatting a column for dates. I am setting up a template spreadsheet for the company I work for. The template spreadsheet has a sheet for entering the raw data and a sheet for summarizing it. I need new dates that are to be entered to be formatted correctly. I have set up a sample spreadsheet and inputted some sample data which looks like the following:
Date
06.11.13
07.11.13
08.11.13
05.10.13
06.09.13
Now if I format these cells as English(UK) dates with the "dd.mm.yy" format the data>sort cannot sort these dates from oldest to newest. I can correctly sort them by using "text to columns" however if i do this then it only format's the cells that currently have a date entered into them and not any new date entries.
So in summary: Format cells into a date format does not allow dates to be sorted using the data>sort tool. (I assume that as they cannot be sorted ,a formula that searches for cells with dates before a certain date will not work either) Text to columns does not allow new entries to be formatted in the same way as the cells that had data in them when the text to columns tool was used.
Is there a way to format blank cells so that they will recognize the data inputted as a date?
View 2 Replies
View Related
Jun 19, 2014
I have data in several columns going left to right. In column N I subtract column H from column I and then in column O I subtract column I from column J. I then use conditional formatting to indicate whether column N is greater than 45 and column O is less than 120, using different formats for each. If the cell value does not meet the condition then there is no conditional formatting used in that cell.
I want to subtotal each column to indicate the amount over or under 45 in column N and over and under 120 in column O and I would like to know if I can do it using the colors in each cell. Most rows do not meet either condition but a few rows do meet both conditions and I don't think sorting and subtotaling is not going to give me what I want.
I have about 7,000 rows in this worksheet and I am going to be removing lines and then maybe adding them back and I would like to track the balances as the data gets moved around. I can use Window Watch for that.
I am using Excel 2007, don't know how to write VBA and would really like a solution that does not use VBA.
View 1 Replies
View Related
Feb 20, 2012
Using Excel 2007 and conditional formatting, how would I find duplicates across all fields in the table, similar to the "remove duplicates" tool that in default mode selects all the fields or offers the option to select fields of choice. I need to look at all the fields.
I've tried concatenation, but only with a limited number of fields; larger amounts slow the process to a crawl. If my table is 10,000 records with 15 fields, what process would I use to highlight the duplicates. How about something in VBA?
View 3 Replies
View Related
Apr 17, 2012
I'm using 2007 and want to add conditional formatting to multiple cells.
Say I have 3 columns and 10 rows of data (A1:10 ; B1:10 ; C1:10). I want to add an icon set to everything in columns B and C based on a comparison with the figure on their immeidate left. So B1 is compared to A1, C1 to B1 etc.
When I do it though it compares everything to A1 (formula in the Conditional Formating is =$A$1 and it won't let me remove the $'s). It looks to me like I can't do it and have to add the formatting to every cell indiviually (which is quite a lot).
View 5 Replies
View Related
Dec 27, 2012
Using Excel 2007: I have a column graph whose numbers/labels on the vertical axis go from ($300,000) to a positive $550,000.
Question: How do I get the labels on the vertical axis to appear in the "accounting format" with the "negative numbers in red" and the "positive numbers in black or blue"?
I have tried to find the answer online and it appears to need to find Format Data Series, which I have been unable to do.
View 3 Replies
View Related
Sep 26, 2013
Is it possible to set a conditional format for the following scenario:
a user clicks on or tabs over to A1 making A1 the "active cell". Once the cell is "active", a message appears in A2?
(Excel 2007)
View 5 Replies
View Related
Feb 3, 2014
I wish to create a worksheet which I want to visually show milestone progress via a traffic light system based on dates , however I need a mechanism to lock these cells as each milestone progresses capturing whether it was within a certain SLA or not.
So for instance I have a worksheet as follows:
InceptionDate
MileStone1
MileStoneSLA1
MileStone2
MilestoneSLA2
Milestone3
Milestone3
20/01/2014
2
=today()-B2
View 3 Replies
View Related
Mar 7, 2009
see spreadsheet. columns a-f contain pupils details.g4-r23 contain marks for 12 questions. row 24 contains total marks for that question. questions are out of 2,3,4 and 5 marks. I would like to format the cells to reflect % for that question. At the moment I have to format column by column to do that. When I format the whole spreadsheet 0 and 1 show in red 2 and 3 in yellow and 4 and 5 in red. I want 2 when equalling 100% to show green not yellow.
View 9 Replies
View Related
Mar 26, 2010
Any way to import and use icon sets for conditional formatting other than the ones provided in excel 2007? I would like to have some circles and shapes in colors other than just yellow, green, red, and gray.
View 5 Replies
View Related
Feb 10, 2014
I have one simple (but large table). It has dates across the top (formatted in hh format). I would like the associated table to format according to the day and also to format differently when there is a public holiday. So I have built a table with the holidays and named the relevant cells as "Holiday_Valid".
I have the following formula in the conditional formatting;
[Code]....
Where D11 has the current day in question and Holiday_Valid is a list of public holidays. Since there is a cell for each hour of each day I am using "int()".
There is a second conditional format to format Sundays differently as below;
[Code] .....
My problem is that these both work well....but then after a few minutes the whole sheet crashes with those dreaded "Trying to recover your data" and "Excel will restart" etc.
I have removed references to named ranges and so far - so good....but this means putting the validation table in the same sheet as the main table. In the past I have been able to use named ranges (albeit not in such convoluted formulae), but now it seems that it is not working any longer.
When I open the recovered sheet, all the conditional formatting has been removed and the message from the repairs is that there was some invalid conditional formatting.
Extensive web searches did show some issues with conditional formatting using names ranges....especially with frozen panes....which I need use with a sheet this big.
View 4 Replies
View Related
Nov 1, 2011
i have a spreadsheet in excel 2007. It shows a students target grade in one column and their recent test mark in another column. Firstly i have applied conditional formatting to say whether or not the student has hit their target, below or above, using red, yellow and green colours. This all works fine.
Now i would like to add a formula that counts the number of cells that are red, yellow or green etc.....
View 7 Replies
View Related
May 25, 2012
I am trying to create conditional formatting in Excel 2007 that is beyond my abilities.
I have 6 rows. The first row is a sum of all the others. Example here:
prg 1 prg 2 prg 3 prg 4 prg 5
Total
4 1 2
10 10
I would like to assign each prg its own color on the total tab, and if it spans multi programs a separate color all together.
View 1 Replies
View Related
Oct 30, 2012
I am applying conditional formatting on a range of cells. I have 2 conditions to color cells in different colors. Once I enter data, cells get colored corectly according to conditions. What I want is to count how many cells are colored by conditional formatting.
I tried using VBA --- Evaluate formula for each cell and count if TRUE.
I observed, for Excel 2007, as the condition is applied on the range, I expect the formula to be changed dynamically for each cell with appropriate addresses, like for A1, if am referring to cell C1, for A2 it should automatically refer to C2.
And excel takes care of this cells are colored correctly,however, when I try to check the 'FormatCondition' in VBA, I get only one formula for entire range. SO I can not use evaluate to find if the condition is satisfied or not ?
View 6 Replies
View Related
Feb 19, 2013
I'm creating an excel document that tracks the amount of time someone has (in months) in the program. Certain residents are able to 'fast track' if they meet conditions, and I am trying to create this spreadsheet so that anyone who looks at it can tell who qualifies (and when).
The issue I'm having is with conditional formatting, because I don't know how to do it with mutliple conditions.
Column C is their previous time (months) in the program
Column D is their current time (months) in the program
Column E is their total time in the program (Sum C+D)
Coumn E is what I would like to format, based on the following rules set out in the program manual:
If previous time is 9 months or more, a resident is eligible to fast track after 6 months current time (format green).
If previous time is less than 6 months, a resident is eligible to fast track after 9 months current time (format green).
I understand that their is an odd gap - but these are the rules currently set out by the program manual, which is what I have to follow.
I'm using Excel 2007 - if that changes anything.
View 3 Replies
View Related
May 8, 2013
My data is in column A. I need to have the data as in column E and F. Column E is the field names.Rows can be up to anywhere and may very.
Excel 2007
A
B
C
D
E
F
View 8 Replies
View Related