Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change Empty Cells Font for the Entire Workbook
Hi Everyone,
I have been given a Spreadsheet which needs Updating. The Current ( Default on Excel for the Person that the Sheet Belongs to ) Font is Set to "Ariel". I have Managed to Change the Column Letters and Row Numbers from "Ariel" to "Tahoma" by using "Format", "Style" and then Modifying the Font. All the Cells in the Spreadsheet ( and Workbook ) that have Information and Formulas in are Either "Tahoma" or "Comic Sans MS" Font. What I would Ideally like is a way of Changing ALL the Empty "Ariel" Cells ( A1:IV65536) to Empty "Tahoma" Cells in Both the Worksheet AND the Workbook. I would like a Method of Achieving this Manually AND with a Macro if Possible Please. I am using XP and XL2002. All the Best Paul |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change Empty Cells Font for the Entire Workbook
Hi Paul,
Manually: Select a single cell | Hit the F5 function key | Special | Check Blanks | OK With the blank cells now selected, apply your desired formatting. Repeat for each worksheet. Programmatically, try: Sub Tester() Dim sh As Worksheet For Each sh In ActiveWorkbook.Worksheets On Error Resume Next sh.Cells.SpecialCells(xlBlanks).Font.Name = "Tahoma" On Error GoTo 0 Next sh End Sub --- Regards, Norman "Paul Black" wrote in message ... Hi Everyone, I have been given a Spreadsheet which needs Updating. The Current ( Default on Excel for the Person that the Sheet Belongs to ) Font is Set to "Ariel". I have Managed to Change the Column Letters and Row Numbers from "Ariel" to "Tahoma" by using "Format", "Style" and then Modifying the Font. All the Cells in the Spreadsheet ( and Workbook ) that have Information and Formulas in are Either "Tahoma" or "Comic Sans MS" Font. What I would Ideally like is a way of Changing ALL the Empty "Ariel" Cells ( A1:IV65536) to Empty "Tahoma" Cells in Both the Worksheet AND the Workbook. I would like a Method of Achieving this Manually AND with a Macro if Possible Please. I am using XP and XL2002. All the Best Paul |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change Empty Cells Font for the Entire Workbook
Hi Norman,
Thanks for the Reply. I First tried the Manual Method, and this did work Between Cells A1 and the Last Active Cell, But it Ignored Everything Between the Last Active Cell and Cell IV65536. I then tried the Macro and Got Exactly the Same Results. All the Best Paul "Norman Jones" wrote in message ... Hi Paul, Manually: Select a single cell | Hit the F5 function key | Special | Check Blanks | OK With the blank cells now selected, apply your desired formatting. Repeat for each worksheet. Programmatically, try: Sub Tester() Dim sh As Worksheet For Each sh In ActiveWorkbook.Worksheets On Error Resume Next sh.Cells.SpecialCells(xlBlanks).Font.Name = "Tahoma" On Error GoTo 0 Next sh End Sub --- Regards, Norman "Paul Black" wrote in message ... Hi Everyone, I have been given a Spreadsheet which needs Updating. The Current ( Default on Excel for the Person that the Sheet Belongs to ) Font is Set to "Ariel". I have Managed to Change the Column Letters and Row Numbers from "Ariel" to "Tahoma" by using "Format", "Style" and then Modifying the Font. All the Cells in the Spreadsheet ( and Workbook ) that have Information and Formulas in are Either "Tahoma" or "Comic Sans MS" Font. What I would Ideally like is a way of Changing ALL the Empty "Ariel" Cells ( A1:IV65536) to Empty "Tahoma" Cells in Both the Worksheet AND the Workbook. I would like a Method of Achieving this Manually AND with a Macro if Possible Please. I am using XP and XL2002. All the Best Paul |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change Empty Cells Font for the Entire Workbook
Sub Tester()
Dim sh As Worksheet For Each sh In ActiveWorkbook.Worksheets On Error Resume Next sh.Cells.Font.Name = "Tahoma" On Error GoTo 0 Next sh End Sub Although, it seems to me if you set the font for the normal style to Tahoma, it should make that the default for blank cells unless the have previously been set to a different font. Another think you could do is go to a sheet that is formatted the way you want it. click on the intersection and do Edit=Copy, go to this sheet, select A1 and do Edit=PasteSpecial and select formats. If that does more than you want, you can close the workbook without saving changes. -- Regards, Tom Ogilvy "Paul Black" wrote in message ... Hi Norman, Thanks for the Reply. I First tried the Manual Method, and this did work Between Cells A1 and the Last Active Cell, But it Ignored Everything Between the Last Active Cell and Cell IV65536. I then tried the Macro and Got Exactly the Same Results. All the Best Paul "Norman Jones" wrote in message ... Hi Paul, Manually: Select a single cell | Hit the F5 function key | Special | Check Blanks | OK With the blank cells now selected, apply your desired formatting. Repeat for each worksheet. Programmatically, try: Sub Tester() Dim sh As Worksheet For Each sh In ActiveWorkbook.Worksheets On Error Resume Next sh.Cells.SpecialCells(xlBlanks).Font.Name = "Tahoma" On Error GoTo 0 Next sh End Sub --- Regards, Norman "Paul Black" wrote in message ... Hi Everyone, I have been given a Spreadsheet which needs Updating. The Current ( Default on Excel for the Person that the Sheet Belongs to ) Font is Set to "Ariel". I have Managed to Change the Column Letters and Row Numbers from "Ariel" to "Tahoma" by using "Format", "Style" and then Modifying the Font. All the Cells in the Spreadsheet ( and Workbook ) that have Information and Formulas in are Either "Tahoma" or "Comic Sans MS" Font. What I would Ideally like is a way of Changing ALL the Empty "Ariel" Cells ( A1:IV65536) to Empty "Tahoma" Cells in Both the Worksheet AND the Workbook. I would like a Method of Achieving this Manually AND with a Macro if Possible Please. I am using XP and XL2002. All the Best Paul |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change Empty Cells Font for the Entire Workbook
Hi Tom,
Thanks for the Reply. Your Macro does change ALL the Blank Cells ( A1:IV65536 )to "Tahoma", Unfortunately it also Changes Cells that have Data in. I Only want Blank Cells to be Changed. All the Best Paul "Tom Ogilvy" wrote in message ... Sub Tester() Dim sh As Worksheet For Each sh In ActiveWorkbook.Worksheets On Error Resume Next sh.Cells.Font.Name = "Tahoma" On Error GoTo 0 Next sh End Sub Although, it seems to me if you set the font for the normal style to Tahoma, it should make that the default for blank cells unless the have previously been set to a different font. Another think you could do is go to a sheet that is formatted the way you want it. click on the intersection and do Edit=Copy, go to this sheet, select A1 and do Edit=PasteSpecial and select formats. If that does more than you want, you can close the workbook without saving changes. -- Regards, Tom Ogilvy "Paul Black" wrote in message ... Hi Norman, Thanks for the Reply. I First tried the Manual Method, and this did work Between Cells A1 and the Last Active Cell, But it Ignored Everything Between the Last Active Cell and Cell IV65536. I then tried the Macro and Got Exactly the Same Results. All the Best Paul "Norman Jones" wrote in message ... Hi Paul, Manually: Select a single cell | Hit the F5 function key | Special | Check Blanks OK With the blank cells now selected, apply your desired formatting. Repeat for each worksheet. Programmatically, try: Sub Tester() Dim sh As Worksheet For Each sh In ActiveWorkbook.Worksheets On Error Resume Next sh.Cells.SpecialCells(xlBlanks).Font.Name = "Tahoma" On Error GoTo 0 Next sh End Sub --- Regards, Norman "Paul Black" wrote in message ... Hi Everyone, I have been given a Spreadsheet which needs Updating. The Current ( Default on Excel for the Person that the Sheet Belongs to ) Font is Set to "Ariel". I have Managed to Change the Column Letters and Row Numbers from "Ariel" to "Tahoma" by using "Format", "Style" and then Modifying the Font. All the Cells in the Spreadsheet ( and Workbook ) that have Information and Formulas in are Either "Tahoma" or "Comic Sans MS" Font. What I would Ideally like is a way of Changing ALL the Empty "Ariel" Cells ( A1:IV65536) to Empty "Tahoma" Cells in Both the Worksheet AND the Workbook. I would like a Method of Achieving this Manually AND with a Macro if Possible Please. I am using XP and XL2002. All the Best Paul |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change Empty Cells Font for the Entire Workbook
|
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change Empty Cells Font for the Entire Workbook
Hi Paul,
If you really to format ALL empty cells on each worksheet, you can try the following: Sub Tester() Dim sh As Worksheet For Each sh In ActiveWorkbook.Worksheets With sh If Intersect(.UsedRange, .Cells(Rows.Count, _ Columns.Count)) Is Nothing Then .Cells(Rows.Count, Columns.Count).Font.Name = "Tahoma" End If On Error Resume Next .Cells.SpecialCells(xlBlanks).Font.Name = "Tahoma" On Error GoTo 0 End With Next sh End Sub This is not likely to be excessively fast! --- Regards, Norman "Paul Black" wrote in message ... Thanks Myrna, I tried your Suggestion, it Worked for ALL Blank Cells from "A1" to the Last Cell with Something in. It Ignored from that Cell to Cell IV65536. All the Best Paul Myrna Larson wrote in message . .. Edit/Goto, click the Special button. Select Blanks. Then apply the formatting you want. To do this in a macro, turn on the macro recorder, do it manually, stop the recorder and look at the code it generated. On 9 Sep 2004 15:04:30 -0700, (Paul Black) wrote: Hi Tom, Thanks for the Reply. Your Macro does change ALL the Blank Cells ( A1:IV65536 )to "Tahoma", Unfortunately it also Changes Cells that have Data in. I Only want Blank Cells to be Changed. All the Best Paul "Tom Ogilvy" wrote in message ... Sub Tester() Dim sh As Worksheet For Each sh In ActiveWorkbook.Worksheets On Error Resume Next sh.Cells.Font.Name = "Tahoma" On Error GoTo 0 Next sh End Sub Although, it seems to me if you set the font for the normal style to Tahoma, it should make that the default for blank cells unless the have previously been set to a different font. Another think you could do is go to a sheet that is formatted the way you want it. click on the intersection and do Edit=Copy, go to this sheet, select A1 and do Edit=PasteSpecial and select formats. If that does more than you want, you can close the workbook without saving changes. -- Regards, Tom Ogilvy "Paul Black" wrote in message ... Hi Norman, Thanks for the Reply. I First tried the Manual Method, and this did work Between Cells A1 and the Last Active Cell, But it Ignored Everything Between the Last Active Cell and Cell IV65536. I then tried the Macro and Got Exactly the Same Results. All the Best Paul "Norman Jones" wrote in message ... Hi Paul, Manually: Select a single cell | Hit the F5 function key | Special | Check Blanks OK With the blank cells now selected, apply your desired formatting. Repeat for each worksheet. Programmatically, try: Sub Tester() Dim sh As Worksheet For Each sh In ActiveWorkbook.Worksheets On Error Resume Next sh.Cells.SpecialCells(xlBlanks).Font.Name = "Tahoma" On Error GoTo 0 Next sh End Sub --- Regards, Norman "Paul Black" wrote in message ... Hi Everyone, I have been given a Spreadsheet which needs Updating. The Current ( Default on Excel for the Person that the Sheet Belongs to ) Font is Set to "Ariel". I have Managed to Change the Column Letters and Row Numbers from "Ariel" to "Tahoma" by using "Format", "Style" and then Modifying the Font. All the Cells in the Spreadsheet ( and Workbook ) that have Information and Formulas in are Either "Tahoma" or "Comic Sans MS" Font. What I would Ideally like is a way of Changing ALL the Empty "Ariel" Cells ( A1:IV65536) to Empty "Tahoma" Cells in Both the Worksheet AND the Workbook. I would like a Method of Achieving this Manually AND with a Macro if Possible Please. I am using XP and XL2002. All the Best Paul |
#9
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change Empty Cells Font for the Entire Workbook
Hi Tom,
I think you would want to delete the entire row and entire column of IV65536 to reset the used range or your file size will grow tremendously I found no need to delete either the row or column as I make no physical entry in this cell. In testing, saving the file after running the procedure was sufficient to restore the initial used range and, to within plus/minus 1%, the initial file size. which begs the question of why worry about these unused cells anyway I, myself, am not concerned by these cells and I endeavoured to convey this in my final paragraph: That said, discussion as to the merits or demerits of one approach over another is moot to the extent that the solution represents the resolution of a problem that I would not expect to encounter. As regards your final point: If the Normal Style is set to Tahoma, then any "new" cell will be formatted with Tahoma. My understanding of the OP's requirement is that only blank cells be formatted in Tahoma. I believe that changing the Normal Style acts on empty and populated cells alike. --- Regards, Norman "Tom Ogilvy" wrote in message ... I think you would want to delete the entire row and entire column of IV65536 to reset the used range or your file size will grow tremendously - which begs the question of why worry about these unused cells anyway. If the Normal Style is set to Tahoma, then any "new" cell will be formatted with Tahoma. -- Regards, Tom Ogilvy "Norman Jones" wrote in message ... Hi Swatsp0p, I have no problem with the manual approach except that it is very substantially slower than the programmatic solution. Using my procedure, I was able to process a five sheet workbook in approximately the same time as I was able to process a single sheet manually. This, of course, presupposes the existence of the code. <g Incidentally, you could remove a redundant step from your suggestion: instead of making an entry in cell IV65536 and later deleting the entry, simply format it as Tahoma. No subsequent deletion is required and the requisite used range is established. That said, discussion as to the merits or demerits of one approach over another is moot to the extent that the solution represents the resolution of a problem that I would not expect to encounter. --- Regards, Norman "swatsp0p" wrote in message ... What happens if you put an entry in cell IV65536 then did: Select a single cell | Hit the F5 function key | Special | Check Blanks | OK With the blank cells now selected, apply your desired formatting. Once formatted, delete the entry in IV65536? "Norman Jones" wrote: Hi Paul, If you really to format ALL empty cells on each worksheet, you can try the following: Sub Tester() Dim sh As Worksheet For Each sh In ActiveWorkbook.Worksheets With sh If Intersect(.UsedRange, .Cells(Rows.Count, _ Columns.Count)) Is Nothing Then .Cells(Rows.Count, Columns.Count).Font.Name = "Tahoma" End If On Error Resume Next .Cells.SpecialCells(xlBlanks).Font.Name = "Tahoma" On Error GoTo 0 End With Next sh End Sub This is not likely to be excessively fast! --- Regards, Norman "Paul Black" wrote in message ... Thanks Myrna, I tried your Suggestion, it Worked for ALL Blank Cells from "A1" to the Last Cell with Something in. It Ignored from that Cell to Cell IV65536. All the Best Paul Myrna Larson wrote in message . .. Edit/Goto, click the Special button. Select Blanks. Then apply the formatting you want. To do this in a macro, turn on the macro recorder, do it manually, stop the recorder and look at the code it generated. On 9 Sep 2004 15:04:30 -0700, (Paul Black) wrote: Hi Tom, Thanks for the Reply. Your Macro does change ALL the Blank Cells ( A1:IV65536 )to "Tahoma", Unfortunately it also Changes Cells that have Data in. I Only want Blank Cells to be Changed. All the Best Paul "Tom Ogilvy" wrote in message ... Sub Tester() Dim sh As Worksheet For Each sh In ActiveWorkbook.Worksheets On Error Resume Next sh.Cells.Font.Name = "Tahoma" On Error GoTo 0 Next sh End Sub Although, it seems to me if you set the font for the normal style to Tahoma, it should make that the default for blank cells unless the have previously been set to a different font. Another think you could do is go to a sheet that is formatted the way you want it. click on the intersection and do Edit=Copy, go to this sheet, select A1 and do Edit=PasteSpecial and select formats. If that does more than you want, you can close the workbook without saving changes. -- Regards, Tom Ogilvy "Paul Black" wrote in message ... Hi Norman, Thanks for the Reply. I First tried the Manual Method, and this did work Between Cells A1 and the Last Active Cell, But it Ignored Everything Between the Last Active Cell and Cell IV65536. I then tried the Macro and Got Exactly the Same Results. All the Best Paul "Norman Jones" wrote in message ... Hi Paul, Manually: Select a single cell | Hit the F5 function key | Special | Check Blanks OK With the blank cells now selected, apply your desired formatting. Repeat for each worksheet. Programmatically, try: Sub Tester() Dim sh As Worksheet For Each sh In ActiveWorkbook.Worksheets On Error Resume Next sh.Cells.SpecialCells(xlBlanks).Font.Name = "Tahoma" On Error GoTo 0 Next sh End Sub --- Regards, Norman "Paul Black" wrote in message ... Hi Everyone, I have been given a Spreadsheet which needs Updating. The Current ( Default on Excel for the Person that the Sheet Belongs to ) Font is Set to "Ariel". I have Managed to Change the Column Letters and Row Numbers from "Ariel" to "Tahoma" by using "Format", "Style" and then Modifying the Font. All the Cells in the Spreadsheet ( and Workbook ) that have Information and Formulas in are Either "Tahoma" or "Comic Sans MS" Font. What I would Ideally like is a way of Changing ALL the Empty "Ariel" Cells ( A1:IV65536) to Empty "Tahoma" Cells in Both the Worksheet AND the Workbook. I would like a Method of Achieving this Manually AND with a Macro if Possible Please. I am using XP and XL2002. All the Best Paul |
#10
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change Empty Cells Font for the Entire Workbook
Hi,
Norman, Your Macro Works and Changes ALL the Cells from A1 to IV65536 to "Tahoma", Even those which have the Font of "Comic Sans MS" and "Verdana", which I want Left as they are. Tom, When the Spreadsheet was First Created in 2002, the Normal Font was Set to "Ariel". So ANY Input Automatically became "Ariel". Once I have Managed to Achieve my Goal, the Spreadsheet will be given back to the User, and then Any Additional Information Input ( Anywhere in the Workbook ) will Automatically be in the Font "Tahoma". Thanks also to Myrna Larson and swatsp0p for your Contributions. All the Best Paul "Norman Jones" wrote in message ... Hi Swatsp0p, I have no problem with the manual approach except that it is very substantially slower than the programmatic solution. Using my procedure, I was able to process a five sheet workbook in approximately the same time as I was able to process a single sheet manually. This, of course, presupposes the existence of the code. <g Incidentally, you could remove a redundant step from your suggestion: instead of making an entry in cell IV65536 and later deleting the entry, simply format it as Tahoma. No subsequent deletion is required and the requisite used range is established. That said, discussion as to the merits or demerits of one approach over another is moot to the extent that the solution represents the resolution of a problem that I would not expect to encounter. --- Regards, Norman "swatsp0p" wrote in message ... What happens if you put an entry in cell IV65536 then did: Select a single cell | Hit the F5 function key | Special | Check Blanks | OK With the blank cells now selected, apply your desired formatting. Once formatted, delete the entry in IV65536? "Norman Jones" wrote: Hi Paul, If you really to format ALL empty cells on each worksheet, you can try the following: Sub Tester() Dim sh As Worksheet For Each sh In ActiveWorkbook.Worksheets With sh If Intersect(.UsedRange, .Cells(Rows.Count, _ Columns.Count)) Is Nothing Then .Cells(Rows.Count, Columns.Count).Font.Name = "Tahoma" End If On Error Resume Next .Cells.SpecialCells(xlBlanks).Font.Name = "Tahoma" On Error GoTo 0 End With Next sh End Sub This is not likely to be excessively fast! --- Regards, Norman "Paul Black" wrote in message ... Thanks Myrna, I tried your Suggestion, it Worked for ALL Blank Cells from "A1" to the Last Cell with Something in. It Ignored from that Cell to Cell IV65536. All the Best Paul Myrna Larson wrote in message . .. Edit/Goto, click the Special button. Select Blanks. Then apply the formatting you want. To do this in a macro, turn on the macro recorder, do it manually, stop the recorder and look at the code it generated. On 9 Sep 2004 15:04:30 -0700, (Paul Black) wrote: Hi Tom, Thanks for the Reply. Your Macro does change ALL the Blank Cells ( A1:IV65536 )to "Tahoma", Unfortunately it also Changes Cells that have Data in. I Only want Blank Cells to be Changed. All the Best Paul "Tom Ogilvy" wrote in message ... Sub Tester() Dim sh As Worksheet For Each sh In ActiveWorkbook.Worksheets On Error Resume Next sh.Cells.Font.Name = "Tahoma" On Error GoTo 0 Next sh End Sub Although, it seems to me if you set the font for the normal style to Tahoma, it should make that the default for blank cells unless the have previously been set to a different font. Another think you could do is go to a sheet that is formatted the way you want it. click on the intersection and do Edit=Copy, go to this sheet, select A1 and do Edit=PasteSpecial and select formats. If that does more than you want, you can close the workbook without saving changes. -- Regards, Tom Ogilvy "Paul Black" wrote in message ... Hi Norman, Thanks for the Reply. I First tried the Manual Method, and this did work Between Cells A1 and the Last Active Cell, But it Ignored Everything Between the Last Active Cell and Cell IV65536. I then tried the Macro and Got Exactly the Same Results. All the Best Paul "Norman Jones" wrote in message ... Hi Paul, Manually: Select a single cell | Hit the F5 function key | Special | Check Blanks OK With the blank cells now selected, apply your desired formatting. Repeat for each worksheet. Programmatically, try: Sub Tester() Dim sh As Worksheet For Each sh In ActiveWorkbook.Worksheets On Error Resume Next sh.Cells.SpecialCells(xlBlanks).Font.Name = "Tahoma" On Error GoTo 0 Next sh End Sub --- Regards, Norman "Paul Black" wrote in message ... Hi Everyone, I have been given a Spreadsheet which needs Updating. The Current ( Default on Excel for the Person that the Sheet Belongs to ) Font is Set to "Ariel". I have Managed to Change the Column Letters and Row Numbers from "Ariel" to "Tahoma" by using "Format", "Style" and then Modifying the Font. All the Cells in the Spreadsheet ( and Workbook ) that have Information and Formulas in are Either "Tahoma" or "Comic Sans MS" Font. What I would Ideally like is a way of Changing ALL the Empty "Ariel" Cells ( A1:IV65536) to Empty "Tahoma" Cells in Both the Worksheet AND the Workbook. I would like a Method of Achieving this Manually AND with a Macro if Possible Please. I am using XP and XL2002. All the Best Paul |
#11
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change Empty Cells Font for the Entire Workbook
Hi Paul,
Norman, Your Macro Works and Changes ALL the Cells from A1 to IV65536 to "Tahoma" No. It operates uniquely on empty cells. Even those which have the Font of "Comic Sans MS" and "Verdana", which I want Left as they are. Where did these conditions come from?!! This is rendered still more perplexing when considered in juxtaposition to your response to an earlier reply by Tom Ogilvy, in which you said you said: Your Macro does change ALL the Blank Cells ( A1:IV65536 )to "Tahoma", Unfortunately it also Changes Cells that have Data in. I Only want Blank Cells to be Changed. --- Regards, Norman "Paul Black" wrote in message ... Hi, Norman, Your Macro Works and Changes ALL the Cells from A1 to IV65536 to "Tahoma", Even those which have the Font of "Comic Sans MS" and "Verdana", which I want Left as they are. Tom, When the Spreadsheet was First Created in 2002, the Normal Font was Set to "Ariel". So ANY Input Automatically became "Ariel". Once I have Managed to Achieve my Goal, the Spreadsheet will be given back to the User, and then Any Additional Information Input ( Anywhere in the Workbook ) will Automatically be in the Font "Tahoma". Thanks also to Myrna Larson and swatsp0p for your Contributions. All the Best Paul "Norman Jones" wrote in message ... Hi Swatsp0p, I have no problem with the manual approach except that it is very substantially slower than the programmatic solution. Using my procedure, I was able to process a five sheet workbook in approximately the same time as I was able to process a single sheet manually. This, of course, presupposes the existence of the code. <g Incidentally, you could remove a redundant step from your suggestion: instead of making an entry in cell IV65536 and later deleting the entry, simply format it as Tahoma. No subsequent deletion is required and the requisite used range is established. That said, discussion as to the merits or demerits of one approach over another is moot to the extent that the solution represents the resolution of a problem that I would not expect to encounter. --- Regards, Norman "swatsp0p" wrote in message ... What happens if you put an entry in cell IV65536 then did: Select a single cell | Hit the F5 function key | Special | Check Blanks | OK With the blank cells now selected, apply your desired formatting. Once formatted, delete the entry in IV65536? "Norman Jones" wrote: Hi Paul, If you really to format ALL empty cells on each worksheet, you can try the following: Sub Tester() Dim sh As Worksheet For Each sh In ActiveWorkbook.Worksheets With sh If Intersect(.UsedRange, .Cells(Rows.Count, _ Columns.Count)) Is Nothing Then .Cells(Rows.Count, Columns.Count).Font.Name = "Tahoma" End If On Error Resume Next .Cells.SpecialCells(xlBlanks).Font.Name = "Tahoma" On Error GoTo 0 End With Next sh End Sub This is not likely to be excessively fast! --- Regards, Norman "Paul Black" wrote in message ... Thanks Myrna, I tried your Suggestion, it Worked for ALL Blank Cells from "A1" to the Last Cell with Something in. It Ignored from that Cell to Cell IV65536. All the Best Paul Myrna Larson wrote in message . .. Edit/Goto, click the Special button. Select Blanks. Then apply the formatting you want. To do this in a macro, turn on the macro recorder, do it manually, stop the recorder and look at the code it generated. On 9 Sep 2004 15:04:30 -0700, (Paul Black) wrote: Hi Tom, Thanks for the Reply. Your Macro does change ALL the Blank Cells ( A1:IV65536 )to "Tahoma", Unfortunately it also Changes Cells that have Data in. I Only want Blank Cells to be Changed. All the Best Paul "Tom Ogilvy" wrote in message ... Sub Tester() Dim sh As Worksheet For Each sh In ActiveWorkbook.Worksheets On Error Resume Next sh.Cells.Font.Name = "Tahoma" On Error GoTo 0 Next sh End Sub Although, it seems to me if you set the font for the normal style to Tahoma, it should make that the default for blank cells unless the have previously been set to a different font. Another think you could do is go to a sheet that is formatted the way you want it. click on the intersection and do Edit=Copy, go to this sheet, select A1 and do Edit=PasteSpecial and select formats. If that does more than you want, you can close the workbook without saving changes. -- Regards, Tom Ogilvy "Paul Black" wrote in message ... Hi Norman, Thanks for the Reply. I First tried the Manual Method, and this did work Between Cells A1 and the Last Active Cell, But it Ignored Everything Between the Last Active Cell and Cell IV65536. I then tried the Macro and Got Exactly the Same Results. All the Best Paul "Norman Jones" wrote in message ... Hi Paul, Manually: Select a single cell | Hit the F5 function key | Special | Check Blanks OK With the blank cells now selected, apply your desired formatting. Repeat for each worksheet. Programmatically, try: Sub Tester() Dim sh As Worksheet For Each sh In ActiveWorkbook.Worksheets On Error Resume Next sh.Cells.SpecialCells(xlBlanks).Font.Name = "Tahoma" On Error GoTo 0 Next sh End Sub --- Regards, Norman "Paul Black" wrote in message ... Hi Everyone, I have been given a Spreadsheet which needs Updating. The Current ( Default on Excel for the Person that the Sheet Belongs to ) Font is Set to "Ariel". I have Managed to Change the Column Letters and Row Numbers from "Ariel" to "Tahoma" by using "Format", "Style" and then Modifying the Font. All the Cells in the Spreadsheet ( and Workbook ) that have Information and Formulas in are Either "Tahoma" or "Comic Sans MS" Font. What I would Ideally like is a way of Changing ALL the Empty "Ariel" Cells ( A1:IV65536) to Empty "Tahoma" Cells in Both the Worksheet AND the Workbook. I would like a Method of Achieving this Manually AND with a Macro if Possible Please. I am using XP and XL2002. All the Best Paul |
#12
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change Empty Cells Font for the Entire Workbook
Hi Norman and Paul
I agree Norman's macro should only change font in empty cells. Don't see why it does not for Paul. One thing though, if the "Normal" font is still set to Arial, if a user subsequently clears formats the font will revert to Arial. I may have missed something in this thread but I don't see what the problem is. From the opriginal post, all sheets are like this: Normal font: Arial Formatted fonts: Tahoma and Comic So, simply change the Normal font to Tahoma (Format Style). Comic Cells will remain Comic, Tahoma cells will remain Tahoma, all unformatted cells will adopt the new Normal/Tahoma (also row / col headers). Tom Ogilvy suggested same. But - any previous Normal/Arial cells that were formatted say bold or a different font size will remain Arial. By definition from the original post these could only be in empty cells so not obvious. After changing the Normal style, a macro could find and reformat all empty/non- Tahoma cells in the Used range to Tahoma. Regards, Peter -----Original Message----- Hi Paul, Norman, Your Macro Works and Changes ALL the Cells from A1 to IV65536 to "Tahoma" No. It operates uniquely on empty cells. Even those which have the Font of "Comic Sans MS" and "Verdana", which I want Left as they are. Where did these conditions come from?!! This is rendered still more perplexing when considered in juxtaposition to your response to an earlier reply by Tom Ogilvy, in which you said you said: Your Macro does change ALL the Blank Cells ( A1:IV65536 ) to "Tahoma", Unfortunately it also Changes Cells that have Data in. I Only want Blank Cells to be Changed. --- Regards, Norman "Paul Black" wrote in message m... Hi, Norman, Your Macro Works and Changes ALL the Cells from A1 to IV65536 to "Tahoma", Even those which have the Font of "Comic Sans MS" and "Verdana", which I want Left as they are. Tom, When the Spreadsheet was First Created in 2002, the Normal Font was Set to "Ariel". So ANY Input Automatically became "Ariel". Once I have Managed to Achieve my Goal, the Spreadsheet will be given back to the User, and then Any Additional Information Input ( Anywhere in the Workbook ) will Automatically be in the Font "Tahoma". Thanks also to Myrna Larson and swatsp0p for your Contributions. All the Best Paul "Norman Jones" wrote in message ... Hi Swatsp0p, I have no problem with the manual approach except that it is very substantially slower than the programmatic solution. Using my procedure, I was able to process a five sheet workbook in approximately the same time as I was able to process a single sheet manually. This, of course, presupposes the existence of the code. <g Incidentally, you could remove a redundant step from your suggestion: instead of making an entry in cell IV65536 and later deleting the entry, simply format it as Tahoma. No subsequent deletion is required and the requisite used range is established. That said, discussion as to the merits or demerits of one approach over another is moot to the extent that the solution represents the resolution of a problem that I would not expect to encounter. --- Regards, Norman "swatsp0p" wrote in message news:EFC198AF-5AA6-49E6-9F60- ... What happens if you put an entry in cell IV65536 then did: Select a single cell | Hit the F5 function key | Special | Check Blanks | OK With the blank cells now selected, apply your desired formatting. Once formatted, delete the entry in IV65536? "Norman Jones" wrote: Hi Paul, If you really to format ALL empty cells on each worksheet, you can try the following: Sub Tester() Dim sh As Worksheet For Each sh In ActiveWorkbook.Worksheets With sh If Intersect(.UsedRange, .Cells(Rows.Count, _ Columns.Count)) Is Nothing Then .Cells(Rows.Count, Columns.Count).Font.Name = "Tahoma" End If On Error Resume Next .Cells.SpecialCells(xlBlanks).Font.Name = "Tahoma" On Error GoTo 0 End With Next sh End Sub This is not likely to be excessively fast! --- Regards, Norman "Paul Black" wrote in message ... Thanks Myrna, I tried your Suggestion, it Worked for ALL Blank Cells from "A1" to the Last Cell with Something in. It Ignored from that Cell to Cell IV65536. All the Best Paul Myrna Larson wrote in message . .. Edit/Goto, click the Special button. Select Blanks. Then apply the formatting you want. To do this in a macro, turn on the macro recorder, do it manually, stop the recorder and look at the code it generated. On 9 Sep 2004 15:04:30 -0700, (Paul Black) wrote: Hi Tom, Thanks for the Reply. Your Macro does change ALL the Blank Cells ( A1:IV65536 )to "Tahoma", Unfortunately it also Changes Cells that have Data in. I Only want Blank Cells to be Changed. All the Best Paul "Tom Ogilvy" wrote in message ... Sub Tester() Dim sh As Worksheet For Each sh In ActiveWorkbook.Worksheets On Error Resume Next sh.Cells.Font.Name = "Tahoma" On Error GoTo 0 Next sh End Sub Although, it seems to me if you set the font for the normal style to Tahoma, it should make that the default for blank cells unless the have previously been set to a different font. Another think you could do is go to a sheet that is formatted the way you want it. click on the intersection and do Edit=Copy, go to this sheet, select A1 and do Edit=PasteSpecial and select formats. If that does more than you want, you can close the workbook without saving changes. -- Regards, Tom Ogilvy "Paul Black" wrote in message ... Hi Norman, Thanks for the Reply. I First tried the Manual Method, and this did work Between Cells A1 and the Last Active Cell, But it Ignored Everything Between the Last Active Cell and Cell IV65536. I then tried the Macro and Got Exactly the Same Results. All the Best Paul "Norman Jones" wrote in message ... Hi Paul, Manually: Select a single cell | Hit the F5 function key | Special | Check Blanks OK With the blank cells now selected, apply your desired formatting. Repeat for each worksheet. Programmatically, try: Sub Tester() Dim sh As Worksheet For Each sh In ActiveWorkbook.Worksheets On Error Resume Next sh.Cells.SpecialCells (xlBlanks).Font.Name = "Tahoma" On Error GoTo 0 Next sh End Sub --- Regards, Norman "Paul Black" wrote in message ... Hi Everyone, I have been given a Spreadsheet which needs Updating. The Current ( Default on Excel for the Person that the Sheet Belongs to ) Font is Set to "Ariel". I have Managed to Change the Column Letters and Row Numbers from "Ariel" to "Tahoma" by using "Format", "Style" and then Modifying the Font. All the Cells in the Spreadsheet ( and Workbook ) that have Information and Formulas in are Either "Tahoma" or "Comic Sans MS" Font. What I would Ideally like is a way of Changing ALL the Empty "Ariel" Cells ( A1:IV65536) to Empty "Tahoma" Cells in Both the Worksheet AND the Workbook. I would like a Method of Achieving this Manually AND with a Macro if Possible Please. I am using XP and XL2002. All the Best Paul . |
#13
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change Empty Cells Font for the Entire Workbook
You said:
I have Managed to Change the Column Letters and Row Numbers from "Ariel" to "Tahoma" by using "Format", "Style" and then Modifying the Font. so any entry in a new, unused cell will be Tahoma. -- Regards, Tom Ogilvy "Paul Black" wrote in message ... Hi, Norman, Your Macro Works and Changes ALL the Cells from A1 to IV65536 to "Tahoma", Even those which have the Font of "Comic Sans MS" and "Verdana", which I want Left as they are. Tom, When the Spreadsheet was First Created in 2002, the Normal Font was Set to "Ariel". So ANY Input Automatically became "Ariel". Once I have Managed to Achieve my Goal, the Spreadsheet will be given back to the User, and then Any Additional Information Input ( Anywhere in the Workbook ) will Automatically be in the Font "Tahoma". Thanks also to Myrna Larson and swatsp0p for your Contributions. All the Best Paul "Norman Jones" wrote in message ... Hi Swatsp0p, I have no problem with the manual approach except that it is very substantially slower than the programmatic solution. Using my procedure, I was able to process a five sheet workbook in approximately the same time as I was able to process a single sheet manually. This, of course, presupposes the existence of the code. <g Incidentally, you could remove a redundant step from your suggestion: instead of making an entry in cell IV65536 and later deleting the entry, simply format it as Tahoma. No subsequent deletion is required and the requisite used range is established. That said, discussion as to the merits or demerits of one approach over another is moot to the extent that the solution represents the resolution of a problem that I would not expect to encounter. --- Regards, Norman "swatsp0p" wrote in message ... What happens if you put an entry in cell IV65536 then did: Select a single cell | Hit the F5 function key | Special | Check Blanks | OK With the blank cells now selected, apply your desired formatting. Once formatted, delete the entry in IV65536? "Norman Jones" wrote: Hi Paul, If you really to format ALL empty cells on each worksheet, you can try the following: Sub Tester() Dim sh As Worksheet For Each sh In ActiveWorkbook.Worksheets With sh If Intersect(.UsedRange, .Cells(Rows.Count, _ Columns.Count)) Is Nothing Then .Cells(Rows.Count, Columns.Count).Font.Name = "Tahoma" End If On Error Resume Next .Cells.SpecialCells(xlBlanks).Font.Name = "Tahoma" On Error GoTo 0 End With Next sh End Sub This is not likely to be excessively fast! --- Regards, Norman "Paul Black" wrote in message ... Thanks Myrna, I tried your Suggestion, it Worked for ALL Blank Cells from "A1" to the Last Cell with Something in. It Ignored from that Cell to Cell IV65536. All the Best Paul Myrna Larson wrote in message . .. Edit/Goto, click the Special button. Select Blanks. Then apply the formatting you want. To do this in a macro, turn on the macro recorder, do it manually, stop the recorder and look at the code it generated. On 9 Sep 2004 15:04:30 -0700, (Paul Black) wrote: Hi Tom, Thanks for the Reply. Your Macro does change ALL the Blank Cells ( A1:IV65536 )to "Tahoma", Unfortunately it also Changes Cells that have Data in. I Only want Blank Cells to be Changed. All the Best Paul "Tom Ogilvy" wrote in message ... Sub Tester() Dim sh As Worksheet For Each sh In ActiveWorkbook.Worksheets On Error Resume Next sh.Cells.Font.Name = "Tahoma" On Error GoTo 0 Next sh End Sub Although, it seems to me if you set the font for the normal style to Tahoma, it should make that the default for blank cells unless the have previously been set to a different font. Another think you could do is go to a sheet that is formatted the way you want it. click on the intersection and do Edit=Copy, go to this sheet, select A1 and do Edit=PasteSpecial and select formats. If that does more than you want, you can close the workbook without saving changes. -- Regards, Tom Ogilvy "Paul Black" wrote in message ... Hi Norman, Thanks for the Reply. I First tried the Manual Method, and this did work Between Cells A1 and the Last Active Cell, But it Ignored Everything Between the Last Active Cell and Cell IV65536. I then tried the Macro and Got Exactly the Same Results. All the Best Paul "Norman Jones" wrote in message ... Hi Paul, Manually: Select a single cell | Hit the F5 function key | Special | Check Blanks OK With the blank cells now selected, apply your desired formatting. Repeat for each worksheet. Programmatically, try: Sub Tester() Dim sh As Worksheet For Each sh In ActiveWorkbook.Worksheets On Error Resume Next sh.Cells.SpecialCells(xlBlanks).Font.Name = "Tahoma" On Error GoTo 0 Next sh End Sub --- Regards, Norman "Paul Black" wrote in message ... Hi Everyone, I have been given a Spreadsheet which needs Updating. The Current ( Default on Excel for the Person that the Sheet Belongs to ) Font is Set to "Ariel". I have Managed to Change the Column Letters and Row Numbers from "Ariel" to "Tahoma" by using "Format", "Style" and then Modifying the Font. All the Cells in the Spreadsheet ( and Workbook ) that have Information and Formulas in are Either "Tahoma" or "Comic Sans MS" Font. What I would Ideally like is a way of Changing ALL the Empty "Ariel" Cells ( A1:IV65536) to Empty "Tahoma" Cells in Both the Worksheet AND the Workbook. I would like a Method of Achieving this Manually AND with a Macro if Possible Please. I am using XP and XL2002. All the Best Paul |
#14
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change Empty Cells Font for the Entire Workbook
Hi Peter,
Re-reading Paul's original post in the light of your response, I realise that I managed, inexcusably, to miss the important statement: All the Cells in the Spreadsheet ( and Workbook ) that have Information and Formulas in are Either "Tahoma" or "Comic Sans MS" Font. Taking this into account, Tom's advice to change the style to Tahoma has to be the solution of choice whether the implementation be manual or programmatic. One thing though, if the "Normal" font is still set to Arial, if a user subsequently clears formats the font will revert to Arial. As this does not appear to be something that the user could achieve inadvertently, I doubt that it should cause the OP any anxiety. --- Regards, Norman "Peter T" wrote in message ... Hi Norman and Paul I agree Norman's macro should only change font in empty cells. Don't see why it does not for Paul. One thing though, if the "Normal" font is still set to Arial, if a user subsequently clears formats the font will revert to Arial. I may have missed something in this thread but I don't see what the problem is. From the opriginal post, all sheets are like this: Normal font: Arial Formatted fonts: Tahoma and Comic So, simply change the Normal font to Tahoma (Format Style). Comic Cells will remain Comic, Tahoma cells will remain Tahoma, all unformatted cells will adopt the new Normal/Tahoma (also row / col headers). Tom Ogilvy suggested same. But - any previous Normal/Arial cells that were formatted say bold or a different font size will remain Arial. By definition from the original post these could only be in empty cells so not obvious. After changing the Normal style, a macro could find and reformat all empty/non- Tahoma cells in the Used range to Tahoma. Regards, Peter -----Original Message----- Hi Paul, Norman, Your Macro Works and Changes ALL the Cells from A1 to IV65536 to "Tahoma" No. It operates uniquely on empty cells. Even those which have the Font of "Comic Sans MS" and "Verdana", which I want Left as they are. Where did these conditions come from?!! This is rendered still more perplexing when considered in juxtaposition to your response to an earlier reply by Tom Ogilvy, in which you said you said: Your Macro does change ALL the Blank Cells ( A1:IV65536 ) to "Tahoma", Unfortunately it also Changes Cells that have Data in. I Only want Blank Cells to be Changed. --- Regards, Norman "Paul Black" wrote in message om... Hi, Norman, Your Macro Works and Changes ALL the Cells from A1 to IV65536 to "Tahoma", Even those which have the Font of "Comic Sans MS" and "Verdana", which I want Left as they are. Tom, When the Spreadsheet was First Created in 2002, the Normal Font was Set to "Ariel". So ANY Input Automatically became "Ariel". Once I have Managed to Achieve my Goal, the Spreadsheet will be given back to the User, and then Any Additional Information Input ( Anywhere in the Workbook ) will Automatically be in the Font "Tahoma". Thanks also to Myrna Larson and swatsp0p for your Contributions. All the Best Paul "Norman Jones" wrote in message ... Hi Swatsp0p, I have no problem with the manual approach except that it is very substantially slower than the programmatic solution. Using my procedure, I was able to process a five sheet workbook in approximately the same time as I was able to process a single sheet manually. This, of course, presupposes the existence of the code. <g Incidentally, you could remove a redundant step from your suggestion: instead of making an entry in cell IV65536 and later deleting the entry, simply format it as Tahoma. No subsequent deletion is required and the requisite used range is established. That said, discussion as to the merits or demerits of one approach over another is moot to the extent that the solution represents the resolution of a problem that I would not expect to encounter. --- Regards, Norman "swatsp0p" wrote in message news:EFC198AF-5AA6-49E6-9F60- ... What happens if you put an entry in cell IV65536 then did: Select a single cell | Hit the F5 function key | Special | Check Blanks | OK With the blank cells now selected, apply your desired formatting. Once formatted, delete the entry in IV65536? "Norman Jones" wrote: Hi Paul, If you really to format ALL empty cells on each worksheet, you can try the following: Sub Tester() Dim sh As Worksheet For Each sh In ActiveWorkbook.Worksheets With sh If Intersect(.UsedRange, .Cells(Rows.Count, _ Columns.Count)) Is Nothing Then .Cells(Rows.Count, Columns.Count).Font.Name = "Tahoma" End If On Error Resume Next .Cells.SpecialCells(xlBlanks).Font.Name = "Tahoma" On Error GoTo 0 End With Next sh End Sub This is not likely to be excessively fast! --- Regards, Norman "Paul Black" wrote in message ... Thanks Myrna, I tried your Suggestion, it Worked for ALL Blank Cells from "A1" to the Last Cell with Something in. It Ignored from that Cell to Cell IV65536. All the Best Paul Myrna Larson wrote in message . .. Edit/Goto, click the Special button. Select Blanks. Then apply the formatting you want. To do this in a macro, turn on the macro recorder, do it manually, stop the recorder and look at the code it generated. On 9 Sep 2004 15:04:30 -0700, (Paul Black) wrote: Hi Tom, Thanks for the Reply. Your Macro does change ALL the Blank Cells ( A1:IV65536 )to "Tahoma", Unfortunately it also Changes Cells that have Data in. I Only want Blank Cells to be Changed. All the Best Paul "Tom Ogilvy" wrote in message ... Sub Tester() Dim sh As Worksheet For Each sh In ActiveWorkbook.Worksheets On Error Resume Next sh.Cells.Font.Name = "Tahoma" On Error GoTo 0 Next sh End Sub Although, it seems to me if you set the font for the normal style to Tahoma, it should make that the default for blank cells unless the have previously been set to a different font. Another think you could do is go to a sheet that is formatted the way you want it. click on the intersection and do Edit=Copy, go to this sheet, select A1 and do Edit=PasteSpecial and select formats. If that does more than you want, you can close the workbook without saving changes. -- Regards, Tom Ogilvy "Paul Black" wrote in message ... Hi Norman, Thanks for the Reply. I First tried the Manual Method, and this did work Between Cells A1 and the Last Active Cell, But it Ignored Everything Between the Last Active Cell and Cell IV65536. I then tried the Macro and Got Exactly the Same Results. All the Best Paul "Norman Jones" wrote in message ... Hi Paul, Manually: Select a single cell | Hit the F5 function key | Special | Check Blanks OK With the blank cells now selected, apply your desired formatting. Repeat for each worksheet. Programmatically, try: Sub Tester() Dim sh As Worksheet For Each sh In ActiveWorkbook.Worksheets On Error Resume Next sh.Cells.SpecialCells (xlBlanks).Font.Name = "Tahoma" On Error GoTo 0 Next sh End Sub --- Regards, Norman "Paul Black" wrote in message ... Hi Everyone, I have been given a Spreadsheet which needs Updating. The Current ( Default on Excel for the Person that the Sheet Belongs to ) Font is Set to "Ariel". I have Managed to Change the Column Letters and Row Numbers from "Ariel" to "Tahoma" by using "Format", "Style" and then Modifying the Font. All the Cells in the Spreadsheet ( and Workbook ) that have Information and Formulas in are Either "Tahoma" or "Comic Sans MS" Font. What I would Ideally like is a way of Changing ALL the Empty "Ariel" Cells ( A1:IV65536) to Empty "Tahoma" Cells in Both the Worksheet AND the Workbook. I would like a Method of Achieving this Manually AND with a Macro if Possible Please. I am using XP and XL2002. All the Best Paul . |
#15
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change Empty Cells Font for the Entire Workbook
Hi Norman,
I realise that I managed, inexcusably, to miss the important statement: That's a bit self critical. I tend to congratulate myself if I interpret something right way first time :-) Regards, Peter -----Original Message----- Hi Peter, Re-reading Paul's original post in the light of your response, I realise that I managed, inexcusably, to miss the important statement: All the Cells in the Spreadsheet ( and Workbook ) that have Information and Formulas in are Either "Tahoma" or "Comic Sans MS" Font. Taking this into account, Tom's advice to change the style to Tahoma has to be the solution of choice whether the implementation be manual or programmatic. One thing though, if the "Normal" font is still set to Arial, if a user subsequently clears formats the font will revert to Arial. As this does not appear to be something that the user could achieve inadvertently, I doubt that it should cause the OP any anxiety. --- Regards, Norman Snip |
#16
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change Empty Cells Font for the Entire Workbook
Hi Peter,
Thank you - my sense of guilt is somewhat assuaged! Thank you, also, for pointing out my initial oversight. --- Regards, Norman "Peter T" wrote in message ... Hi Norman, I realise that I managed, inexcusably, to miss the important statement: That's a bit self critical. I tend to congratulate myself if I interpret something right way first time :-) Regards, Peter -----Original Message----- Hi Peter, Re-reading Paul's original post in the light of your response, I realise that I managed, inexcusably, to miss the important statement: All the Cells in the Spreadsheet ( and Workbook ) that have Information and Formulas in are Either "Tahoma" or "Comic Sans MS" Font. Taking this into account, Tom's advice to change the style to Tahoma has to be the solution of choice whether the implementation be manual or programmatic. One thing though, if the "Normal" font is still set to Arial, if a user subsequently clears formats the font will revert to Arial. As this does not appear to be something that the user could achieve inadvertently, I doubt that it should cause the OP any anxiety. --- Regards, Norman Snip |
#17
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change Empty Cells Font for the Entire Workbook
Thanks to Everyone who has tried to Solve my Problem, I think I will
have to do it the Long Handed Way. so any entry in a new, unused cell will be Tahoma. Tom, Unfortunately this is NOT the Case. Even doing it the Long Handed Way, there are still going to be Problems, like if they were to Insert a Column, that Column would Automatically Default to the "Ariel" Font. Not to Worry, the Task will still be Done, but just take much longer than I anticipated. Once again, Thanks to Everyone for their Contributions. All the Best Paul "Tom Ogilvy" wrote in message ... You said: I have Managed to Change the Column Letters and Row Numbers from "Ariel" to "Tahoma" by using "Format", "Style" and then Modifying the Font. so any entry in a new, unused cell will be Tahoma. -- Regards, Tom Ogilvy "Paul Black" wrote in message ... Hi, Norman, Your Macro Works and Changes ALL the Cells from A1 to IV65536 to "Tahoma", Even those which have the Font of "Comic Sans MS" and "Verdana", which I want Left as they are. Tom, When the Spreadsheet was First Created in 2002, the Normal Font was Set to "Ariel". So ANY Input Automatically became "Ariel". Once I have Managed to Achieve my Goal, the Spreadsheet will be given back to the User, and then Any Additional Information Input ( Anywhere in the Workbook ) will Automatically be in the Font "Tahoma". Thanks also to Myrna Larson and swatsp0p for your Contributions. All the Best Paul "Norman Jones" wrote in message ... Hi Swatsp0p, I have no problem with the manual approach except that it is very substantially slower than the programmatic solution. Using my procedure, I was able to process a five sheet workbook in approximately the same time as I was able to process a single sheet manually. This, of course, presupposes the existence of the code. <g Incidentally, you could remove a redundant step from your suggestion: instead of making an entry in cell IV65536 and later deleting the entry, simply format it as Tahoma. No subsequent deletion is required and the requisite used range is established. That said, discussion as to the merits or demerits of one approach over another is moot to the extent that the solution represents the resolution of a problem that I would not expect to encounter. --- Regards, Norman "swatsp0p" wrote in message ... What happens if you put an entry in cell IV65536 then did: Select a single cell | Hit the F5 function key | Special | Check Blanks | OK With the blank cells now selected, apply your desired formatting. Once formatted, delete the entry in IV65536? "Norman Jones" wrote: Hi Paul, If you really to format ALL empty cells on each worksheet, you can try the following: Sub Tester() Dim sh As Worksheet For Each sh In ActiveWorkbook.Worksheets With sh If Intersect(.UsedRange, .Cells(Rows.Count, _ Columns.Count)) Is Nothing Then .Cells(Rows.Count, Columns.Count).Font.Name = "Tahoma" End If On Error Resume Next .Cells.SpecialCells(xlBlanks).Font.Name = "Tahoma" On Error GoTo 0 End With Next sh End Sub This is not likely to be excessively fast! --- Regards, Norman "Paul Black" wrote in message ... Thanks Myrna, I tried your Suggestion, it Worked for ALL Blank Cells from "A1" to the Last Cell with Something in. It Ignored from that Cell to Cell IV65536. All the Best Paul Myrna Larson wrote in message . .. Edit/Goto, click the Special button. Select Blanks. Then apply the formatting you want. To do this in a macro, turn on the macro recorder, do it manually, stop the recorder and look at the code it generated. On 9 Sep 2004 15:04:30 -0700, (Paul Black) wrote: Hi Tom, Thanks for the Reply. Your Macro does change ALL the Blank Cells ( A1:IV65536 )to "Tahoma", Unfortunately it also Changes Cells that have Data in. I Only want Blank Cells to be Changed. All the Best Paul "Tom Ogilvy" wrote in message ... Sub Tester() Dim sh As Worksheet For Each sh In ActiveWorkbook.Worksheets On Error Resume Next sh.Cells.Font.Name = "Tahoma" On Error GoTo 0 Next sh End Sub Although, it seems to me if you set the font for the normal style to Tahoma, it should make that the default for blank cells unless the have previously been set to a different font. Another think you could do is go to a sheet that is formatted the way you want it. click on the intersection and do Edit=Copy, go to this sheet, select A1 and do Edit=PasteSpecial and select formats. If that does more than you want, you can close the workbook without saving changes. -- Regards, Tom Ogilvy "Paul Black" wrote in message ... Hi Norman, Thanks for the Reply. I First tried the Manual Method, and this did work Between Cells A1 and the Last Active Cell, But it Ignored Everything Between the Last Active Cell and Cell IV65536. I then tried the Macro and Got Exactly the Same Results. All the Best Paul "Norman Jones" wrote in message ... Hi Paul, Manually: Select a single cell | Hit the F5 function key | Special | Check Blanks OK With the blank cells now selected, apply your desired formatting. Repeat for each worksheet. Programmatically, try: Sub Tester() Dim sh As Worksheet For Each sh In ActiveWorkbook.Worksheets On Error Resume Next sh.Cells.SpecialCells(xlBlanks).Font.Name = "Tahoma" On Error GoTo 0 Next sh End Sub --- Regards, Norman "Paul Black" wrote in message ... Hi Everyone, I have been given a Spreadsheet which needs Updating. The Current ( Default on Excel for the Person that the Sheet Belongs to ) Font is Set to "Ariel". I have Managed to Change the Column Letters and Row Numbers from "Ariel" to "Tahoma" by using "Format", "Style" and then Modifying the Font. All the Cells in the Spreadsheet ( and Workbook ) that have Information and Formulas in are Either "Tahoma" or "Comic Sans MS" Font. What I would Ideally like is a way of Changing ALL the Empty "Ariel" Cells ( A1:IV65536) to Empty "Tahoma" Cells in Both the Worksheet AND the Workbook. I would like a Method of Achieving this Manually AND with a Macro if Possible Please. I am using XP and XL2002. All the Best Paul |
#18
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change Empty Cells Font for the Entire Workbook
so any entry in a new, unused cell will be Tahoma.
Tom, Unfortunately this is NOT the Case We must be talking about differnt things. It certainly is true for me. -- Regards, Tom Ogilvy "Paul Black" wrote in message ... Thanks to Everyone who has tried to Solve my Problem, I think I will have to do it the Long Handed Way. so any entry in a new, unused cell will be Tahoma. Tom, Unfortunately this is NOT the Case. Even doing it the Long Handed Way, there are still going to be Problems, like if they were to Insert a Column, that Column would Automatically Default to the "Ariel" Font. Not to Worry, the Task will still be Done, but just take much longer than I anticipated. Once again, Thanks to Everyone for their Contributions. All the Best Paul "Tom Ogilvy" wrote in message ... You said: I have Managed to Change the Column Letters and Row Numbers from "Ariel" to "Tahoma" by using "Format", "Style" and then Modifying the Font. so any entry in a new, unused cell will be Tahoma. -- Regards, Tom Ogilvy "Paul Black" wrote in message ... Hi, Norman, Your Macro Works and Changes ALL the Cells from A1 to IV65536 to "Tahoma", Even those which have the Font of "Comic Sans MS" and "Verdana", which I want Left as they are. Tom, When the Spreadsheet was First Created in 2002, the Normal Font was Set to "Ariel". So ANY Input Automatically became "Ariel". Once I have Managed to Achieve my Goal, the Spreadsheet will be given back to the User, and then Any Additional Information Input ( Anywhere in the Workbook ) will Automatically be in the Font "Tahoma". Thanks also to Myrna Larson and swatsp0p for your Contributions. All the Best Paul "Norman Jones" wrote in message ... Hi Swatsp0p, I have no problem with the manual approach except that it is very substantially slower than the programmatic solution. Using my procedure, I was able to process a five sheet workbook in approximately the same time as I was able to process a single sheet manually. This, of course, presupposes the existence of the code. <g Incidentally, you could remove a redundant step from your suggestion: instead of making an entry in cell IV65536 and later deleting the entry, simply format it as Tahoma. No subsequent deletion is required and the requisite used range is established. That said, discussion as to the merits or demerits of one approach over another is moot to the extent that the solution represents the resolution of a problem that I would not expect to encounter. --- Regards, Norman "swatsp0p" wrote in message ... What happens if you put an entry in cell IV65536 then did: Select a single cell | Hit the F5 function key | Special | Check Blanks | OK With the blank cells now selected, apply your desired formatting. Once formatted, delete the entry in IV65536? "Norman Jones" wrote: Hi Paul, If you really to format ALL empty cells on each worksheet, you can try the following: Sub Tester() Dim sh As Worksheet For Each sh In ActiveWorkbook.Worksheets With sh If Intersect(.UsedRange, .Cells(Rows.Count, _ Columns.Count)) Is Nothing Then .Cells(Rows.Count, Columns.Count).Font.Name = "Tahoma" End If On Error Resume Next .Cells.SpecialCells(xlBlanks).Font.Name = "Tahoma" On Error GoTo 0 End With Next sh End Sub This is not likely to be excessively fast! --- Regards, Norman "Paul Black" wrote in message ... Thanks Myrna, I tried your Suggestion, it Worked for ALL Blank Cells from "A1" to the Last Cell with Something in. It Ignored from that Cell to Cell IV65536. All the Best Paul Myrna Larson wrote in message . .. Edit/Goto, click the Special button. Select Blanks. Then apply the formatting you want. To do this in a macro, turn on the macro recorder, do it manually, stop the recorder and look at the code it generated. On 9 Sep 2004 15:04:30 -0700, (Paul Black) wrote: Hi Tom, Thanks for the Reply. Your Macro does change ALL the Blank Cells ( A1:IV65536 )to "Tahoma", Unfortunately it also Changes Cells that have Data in. I Only want Blank Cells to be Changed. All the Best Paul "Tom Ogilvy" wrote in message ... Sub Tester() Dim sh As Worksheet For Each sh In ActiveWorkbook.Worksheets On Error Resume Next sh.Cells.Font.Name = "Tahoma" On Error GoTo 0 Next sh End Sub Although, it seems to me if you set the font for the normal style to Tahoma, it should make that the default for blank cells unless the have previously been set to a different font. Another think you could do is go to a sheet that is formatted the way you want it. click on the intersection and do Edit=Copy, go to this sheet, select A1 and do Edit=PasteSpecial and select formats. If that does more than you want, you can close the workbook without saving changes. -- Regards, Tom Ogilvy "Paul Black" wrote in message ... Hi Norman, Thanks for the Reply. I First tried the Manual Method, and this did work Between Cells A1 and the Last Active Cell, But it Ignored Everything Between the Last Active Cell and Cell IV65536. I then tried the Macro and Got Exactly the Same Results. All the Best Paul "Norman Jones" wrote in message ... Hi Paul, Manually: Select a single cell | Hit the F5 function key | Special | Check Blanks OK With the blank cells now selected, apply your desired formatting. Repeat for each worksheet. Programmatically, try: Sub Tester() Dim sh As Worksheet For Each sh In ActiveWorkbook.Worksheets On Error Resume Next sh.Cells.SpecialCells(xlBlanks).Font.Name = "Tahoma" On Error GoTo 0 Next sh End Sub --- Regards, Norman "Paul Black" wrote in message ... Hi Everyone, I have been given a Spreadsheet which needs Updating. The Current ( Default on Excel for the Person that the Sheet Belongs to ) Font is Set to "Ariel". I have Managed to Change the Column Letters and Row Numbers from "Ariel" to "Tahoma" by using "Format", "Style" and then Modifying the Font. All the Cells in the Spreadsheet ( and Workbook ) that have Information and Formulas in are Either "Tahoma" or "Comic Sans MS" Font. What I would Ideally like is a way of Changing ALL the Empty "Ariel" Cells ( A1:IV65536) to Empty "Tahoma" Cells in Both the Worksheet AND the Workbook. I would like a Method of Achieving this Manually AND with a Macro if Possible Please. I am using XP and XL2002. All the Best Paul |
#19
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change Empty Cells Font for the Entire Workbook
Hi Tom,
Changing the "Format", "Style" and Changing the Font from "Ariel" to "Tahoma" ONLY Seems to Change the "Column Letters" and "Row Numbers", it does NOT Change the Cells within the Spreadsheet. I tried Selecting a Single Cell - Hitting the F5 Function Key - Special - Check Blanks - OK, but this ONLY Changes them down to the Last Cell with Data in, it IGNORES from there to "IV65536". Thanks for your Help. All the Best Paul "Tom Ogilvy" wrote in message ... so any entry in a new, unused cell will be Tahoma. Tom, Unfortunately this is NOT the Case We must be talking about differnt things. It certainly is true for me. -- Regards, Tom Ogilvy "Paul Black" wrote in message ... Thanks to Everyone who has tried to Solve my Problem, I think I will have to do it the Long Handed Way. so any entry in a new, unused cell will be Tahoma. Tom, Unfortunately this is NOT the Case. Even doing it the Long Handed Way, there are still going to be Problems, like if they were to Insert a Column, that Column would Automatically Default to the "Ariel" Font. Not to Worry, the Task will still be Done, but just take much longer than I anticipated. Once again, Thanks to Everyone for their Contributions. All the Best Paul "Tom Ogilvy" wrote in message ... You said: I have Managed to Change the Column Letters and Row Numbers from "Ariel" to "Tahoma" by using "Format", "Style" and then Modifying the Font. so any entry in a new, unused cell will be Tahoma. -- Regards, Tom Ogilvy "Paul Black" wrote in message ... Hi, Norman, Your Macro Works and Changes ALL the Cells from A1 to IV65536 to "Tahoma", Even those which have the Font of "Comic Sans MS" and "Verdana", which I want Left as they are. Tom, When the Spreadsheet was First Created in 2002, the Normal Font was Set to "Ariel". So ANY Input Automatically became "Ariel". Once I have Managed to Achieve my Goal, the Spreadsheet will be given back to the User, and then Any Additional Information Input ( Anywhere in the Workbook ) will Automatically be in the Font "Tahoma". Thanks also to Myrna Larson and swatsp0p for your Contributions. All the Best Paul "Norman Jones" wrote in message ... Hi Swatsp0p, I have no problem with the manual approach except that it is very substantially slower than the programmatic solution. Using my procedure, I was able to process a five sheet workbook in approximately the same time as I was able to process a single sheet manually. This, of course, presupposes the existence of the code. <g Incidentally, you could remove a redundant step from your suggestion: instead of making an entry in cell IV65536 and later deleting the entry, simply format it as Tahoma. No subsequent deletion is required and the requisite used range is established. That said, discussion as to the merits or demerits of one approach over another is moot to the extent that the solution represents the resolution of a problem that I would not expect to encounter. --- Regards, Norman "swatsp0p" wrote in message ... What happens if you put an entry in cell IV65536 then did: Select a single cell | Hit the F5 function key | Special | Check Blanks | OK With the blank cells now selected, apply your desired formatting. Once formatted, delete the entry in IV65536? "Norman Jones" wrote: Hi Paul, If you really to format ALL empty cells on each worksheet, you can try the following: Sub Tester() Dim sh As Worksheet For Each sh In ActiveWorkbook.Worksheets With sh If Intersect(.UsedRange, .Cells(Rows.Count, _ Columns.Count)) Is Nothing Then .Cells(Rows.Count, Columns.Count).Font.Name = "Tahoma" End If On Error Resume Next .Cells.SpecialCells(xlBlanks).Font.Name = "Tahoma" On Error GoTo 0 End With Next sh End Sub This is not likely to be excessively fast! --- Regards, Norman "Paul Black" wrote in message ... Thanks Myrna, I tried your Suggestion, it Worked for ALL Blank Cells from "A1" to the Last Cell with Something in. It Ignored from that Cell to Cell IV65536. All the Best Paul Myrna Larson wrote in message . .. Edit/Goto, click the Special button. Select Blanks. Then apply the formatting you want. To do this in a macro, turn on the macro recorder, do it manually, stop the recorder and look at the code it generated. On 9 Sep 2004 15:04:30 -0700, (Paul Black) wrote: Hi Tom, Thanks for the Reply. Your Macro does change ALL the Blank Cells ( A1:IV65536 )to "Tahoma", Unfortunately it also Changes Cells that have Data in. I Only want Blank Cells to be Changed. All the Best Paul "Tom Ogilvy" wrote in message ... Sub Tester() Dim sh As Worksheet For Each sh In ActiveWorkbook.Worksheets On Error Resume Next sh.Cells.Font.Name = "Tahoma" On Error GoTo 0 Next sh End Sub Although, it seems to me if you set the font for the normal style to Tahoma, it should make that the default for blank cells unless the have previously been set to a different font. Another think you could do is go to a sheet that is formatted the way you want it. click on the intersection and do Edit=Copy, go to this sheet, select A1 and do Edit=PasteSpecial and select formats. If that does more than you want, you can close the workbook without saving changes. -- Regards, Tom Ogilvy "Paul Black" wrote in message ... Hi Norman, Thanks for the Reply. I First tried the Manual Method, and this did work Between Cells A1 and the Last Active Cell, But it Ignored Everything Between the Last Active Cell and Cell IV65536. I then tried the Macro and Got Exactly the Same Results. All the Best Paul "Norman Jones" wrote in message ... Hi Paul, Manually: Select a single cell | Hit the F5 function key | Special | Check Blanks OK With the blank cells now selected, apply your desired formatting. Repeat for each worksheet. Programmatically, try: Sub Tester() Dim sh As Worksheet For Each sh In ActiveWorkbook.Worksheets On Error Resume Next sh.Cells.SpecialCells(xlBlanks).Font.Name = "Tahoma" On Error GoTo 0 Next sh End Sub --- Regards, Norman "Paul Black" wrote in message ... Hi Everyone, I have been given a Spreadsheet which needs Updating. The Current ( Default on Excel for the Person that the Sheet Belongs to ) Font is Set to "Ariel". I have Managed to Change the Column Letters and Row Numbers from "Ariel" to "Tahoma" by using "Format", "Style" and then Modifying the Font. All the Cells in the Spreadsheet ( and Workbook ) that have Information and Formulas in are Either "Tahoma" or "Comic Sans MS" Font. What I would Ideally like is a way of Changing ALL the Empty "Ariel" Cells ( A1:IV65536) to Empty "Tahoma" Cells in Both the Worksheet AND the Workbook. I would like a Method of Achieving this Manually AND with a Macro if Possible Please. I am using XP and XL2002. All the Best Paul |
#20
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change Empty Cells Font for the Entire Workbook
Hi Paul,
A Suggestion: Open a new 'virgin' workbook Select a worksheet (any) Format | Style | Modify | Change font to Tahoma.| OK Go to cell A1 - check the font - Tahoma, right? Go to cell IV65536 - check the font - Tahoma, right? Insert a column (anywhere) Select any cell in the new column - check the font - Tahoma, right? --- Regards, Norman "Paul Black" wrote in message ... Hi Tom, Changing the "Format", "Style" and Changing the Font from "Ariel" to "Tahoma" ONLY Seems to Change the "Column Letters" and "Row Numbers", it does NOT Change the Cells within the Spreadsheet. I tried Selecting a Single Cell - Hitting the F5 Function Key - Special - Check Blanks - OK, but this ONLY Changes them down to the Last Cell with Data in, it IGNORES from there to "IV65536". Thanks for your Help. All the Best Paul "Tom Ogilvy" wrote in message ... so any entry in a new, unused cell will be Tahoma. Tom, Unfortunately this is NOT the Case We must be talking about differnt things. It certainly is true for me. -- Regards, Tom Ogilvy "Paul Black" wrote in message ... Thanks to Everyone who has tried to Solve my Problem, I think I will have to do it the Long Handed Way. so any entry in a new, unused cell will be Tahoma. Tom, Unfortunately this is NOT the Case. Even doing it the Long Handed Way, there are still going to be Problems, like if they were to Insert a Column, that Column would Automatically Default to the "Ariel" Font. Not to Worry, the Task will still be Done, but just take much longer than I anticipated. Once again, Thanks to Everyone for their Contributions. All the Best Paul "Tom Ogilvy" wrote in message ... You said: I have Managed to Change the Column Letters and Row Numbers from "Ariel" to "Tahoma" by using "Format", "Style" and then Modifying the Font. so any entry in a new, unused cell will be Tahoma. -- Regards, Tom Ogilvy "Paul Black" wrote in message ... Hi, Norman, Your Macro Works and Changes ALL the Cells from A1 to IV65536 to "Tahoma", Even those which have the Font of "Comic Sans MS" and "Verdana", which I want Left as they are. Tom, When the Spreadsheet was First Created in 2002, the Normal Font was Set to "Ariel". So ANY Input Automatically became "Ariel". Once I have Managed to Achieve my Goal, the Spreadsheet will be given back to the User, and then Any Additional Information Input ( Anywhere in the Workbook ) will Automatically be in the Font "Tahoma". Thanks also to Myrna Larson and swatsp0p for your Contributions. All the Best Paul "Norman Jones" wrote in message ... Hi Swatsp0p, I have no problem with the manual approach except that it is very substantially slower than the programmatic solution. Using my procedure, I was able to process a five sheet workbook in approximately the same time as I was able to process a single sheet manually. This, of course, presupposes the existence of the code. <g Incidentally, you could remove a redundant step from your suggestion: instead of making an entry in cell IV65536 and later deleting the entry, simply format it as Tahoma. No subsequent deletion is required and the requisite used range is established. That said, discussion as to the merits or demerits of one approach over another is moot to the extent that the solution represents the resolution of a problem that I would not expect to encounter. --- Regards, Norman "swatsp0p" wrote in message ... What happens if you put an entry in cell IV65536 then did: Select a single cell | Hit the F5 function key | Special | Check Blanks | OK With the blank cells now selected, apply your desired formatting. Once formatted, delete the entry in IV65536? "Norman Jones" wrote: Hi Paul, If you really to format ALL empty cells on each worksheet, you can try the following: Sub Tester() Dim sh As Worksheet For Each sh In ActiveWorkbook.Worksheets With sh If Intersect(.UsedRange, .Cells(Rows.Count, _ Columns.Count)) Is Nothing Then .Cells(Rows.Count, Columns.Count).Font.Name = "Tahoma" End If On Error Resume Next .Cells.SpecialCells(xlBlanks).Font.Name = "Tahoma" On Error GoTo 0 End With Next sh End Sub This is not likely to be excessively fast! --- Regards, Norman "Paul Black" wrote in message ... Thanks Myrna, I tried your Suggestion, it Worked for ALL Blank Cells from "A1" to the Last Cell with Something in. It Ignored from that Cell to Cell IV65536. All the Best Paul Myrna Larson wrote in message . .. Edit/Goto, click the Special button. Select Blanks. Then apply the formatting you want. To do this in a macro, turn on the macro recorder, do it manually, stop the recorder and look at the code it generated. On 9 Sep 2004 15:04:30 -0700, (Paul Black) wrote: Hi Tom, Thanks for the Reply. Your Macro does change ALL the Blank Cells ( A1:IV65536 )to "Tahoma", Unfortunately it also Changes Cells that have Data in. I Only want Blank Cells to be Changed. All the Best Paul "Tom Ogilvy" wrote in message ... Sub Tester() Dim sh As Worksheet For Each sh In ActiveWorkbook.Worksheets On Error Resume Next sh.Cells.Font.Name = "Tahoma" On Error GoTo 0 Next sh End Sub Although, it seems to me if you set the font for the normal style to Tahoma, it should make that the default for blank cells unless the have previously been set to a different font. Another think you could do is go to a sheet that is formatted the way you want it. click on the intersection and do Edit=Copy, go to this sheet, select A1 and do Edit=PasteSpecial and select formats. If that does more than you want, you can close the workbook without saving changes. -- Regards, Tom Ogilvy "Paul Black" wrote in message ... Hi Norman, Thanks for the Reply. I First tried the Manual Method, and this did work Between Cells A1 and the Last Active Cell, But it Ignored Everything Between the Last Active Cell and Cell IV65536. I then tried the Macro and Got Exactly the Same Results. All the Best Paul "Norman Jones" wrote in message ... Hi Paul, Manually: Select a single cell | Hit the F5 function key | Special | Check Blanks OK With the blank cells now selected, apply your desired formatting. Repeat for each worksheet. Programmatically, try: Sub Tester() Dim sh As Worksheet For Each sh In ActiveWorkbook.Worksheets On Error Resume Next sh.Cells.SpecialCells(xlBlanks).Font.Name = "Tahoma" On Error GoTo 0 Next sh End Sub --- Regards, Norman "Paul Black" wrote in message ... Hi Everyone, I have been given a Spreadsheet which needs Updating. The Current ( Default on Excel for the Person that the Sheet Belongs to ) Font is Set to "Ariel". I have Managed to Change the Column Letters and Row Numbers from "Ariel" to "Tahoma" by using "Format", "Style" and then Modifying the Font. All the Cells in the Spreadsheet ( and Workbook ) that have Information and Formulas in are Either "Tahoma" or "Comic Sans MS" Font. What I would Ideally like is a way of Changing ALL the Empty "Ariel" Cells ( A1:IV65536) to Empty "Tahoma" Cells in Both the Worksheet AND the Workbook. I would like a Method of Achieving this Manually AND with a Macro if Possible Please. I am using XP and XL2002. All the Best Paul |
#21
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change Empty Cells Font for the Entire Workbook
That isn't how you would test. You would test by going to a cell beyond
where that procedure puts you and typing in a string. Whala, Tahoma. -- Regards, Tom Ogilvy "Paul Black" wrote in message ... Hi Tom, Changing the "Format", "Style" and Changing the Font from "Ariel" to "Tahoma" ONLY Seems to Change the "Column Letters" and "Row Numbers", it does NOT Change the Cells within the Spreadsheet. I tried Selecting a Single Cell - Hitting the F5 Function Key - Special - Check Blanks - OK, but this ONLY Changes them down to the Last Cell with Data in, it IGNORES from there to "IV65536". Thanks for your Help. All the Best Paul "Tom Ogilvy" wrote in message ... so any entry in a new, unused cell will be Tahoma. Tom, Unfortunately this is NOT the Case We must be talking about differnt things. It certainly is true for me. -- Regards, Tom Ogilvy "Paul Black" wrote in message ... Thanks to Everyone who has tried to Solve my Problem, I think I will have to do it the Long Handed Way. so any entry in a new, unused cell will be Tahoma. Tom, Unfortunately this is NOT the Case. Even doing it the Long Handed Way, there are still going to be Problems, like if they were to Insert a Column, that Column would Automatically Default to the "Ariel" Font. Not to Worry, the Task will still be Done, but just take much longer than I anticipated. Once again, Thanks to Everyone for their Contributions. All the Best Paul "Tom Ogilvy" wrote in message ... You said: I have Managed to Change the Column Letters and Row Numbers from "Ariel" to "Tahoma" by using "Format", "Style" and then Modifying the Font. so any entry in a new, unused cell will be Tahoma. -- Regards, Tom Ogilvy "Paul Black" wrote in message ... Hi, Norman, Your Macro Works and Changes ALL the Cells from A1 to IV65536 to "Tahoma", Even those which have the Font of "Comic Sans MS" and "Verdana", which I want Left as they are. Tom, When the Spreadsheet was First Created in 2002, the Normal Font was Set to "Ariel". So ANY Input Automatically became "Ariel". Once I have Managed to Achieve my Goal, the Spreadsheet will be given back to the User, and then Any Additional Information Input ( Anywhere in the Workbook ) will Automatically be in the Font "Tahoma". Thanks also to Myrna Larson and swatsp0p for your Contributions. All the Best Paul "Norman Jones" wrote in message ... Hi Swatsp0p, I have no problem with the manual approach except that it is very substantially slower than the programmatic solution. Using my procedure, I was able to process a five sheet workbook in approximately the same time as I was able to process a single sheet manually. This, of course, presupposes the existence of the code. <g Incidentally, you could remove a redundant step from your suggestion: instead of making an entry in cell IV65536 and later deleting the entry, simply format it as Tahoma. No subsequent deletion is required and the requisite used range is established. That said, discussion as to the merits or demerits of one approach over another is moot to the extent that the solution represents the resolution of a problem that I would not expect to encounter. --- Regards, Norman "swatsp0p" wrote in message ... What happens if you put an entry in cell IV65536 then did: Select a single cell | Hit the F5 function key | Special | Check Blanks | OK With the blank cells now selected, apply your desired formatting. Once formatted, delete the entry in IV65536? "Norman Jones" wrote: Hi Paul, If you really to format ALL empty cells on each worksheet, you can try the following: Sub Tester() Dim sh As Worksheet For Each sh In ActiveWorkbook.Worksheets With sh If Intersect(.UsedRange, .Cells(Rows.Count, _ Columns.Count)) Is Nothing Then .Cells(Rows.Count, Columns.Count).Font.Name = "Tahoma" End If On Error Resume Next .Cells.SpecialCells(xlBlanks).Font.Name = "Tahoma" On Error GoTo 0 End With Next sh End Sub This is not likely to be excessively fast! --- Regards, Norman "Paul Black" wrote in message ... Thanks Myrna, I tried your Suggestion, it Worked for ALL Blank Cells from "A1" to the Last Cell with Something in. It Ignored from that Cell to Cell IV65536. All the Best Paul Myrna Larson wrote in message . .. Edit/Goto, click the Special button. Select Blanks. Then apply the formatting you want. To do this in a macro, turn on the macro recorder, do it manually, stop the recorder and look at the code it generated. On 9 Sep 2004 15:04:30 -0700, (Paul Black) wrote: Hi Tom, Thanks for the Reply. Your Macro does change ALL the Blank Cells ( A1:IV65536 )to "Tahoma", Unfortunately it also Changes Cells that have Data in. I Only want Blank Cells to be Changed. All the Best Paul "Tom Ogilvy" wrote in message ... Sub Tester() Dim sh As Worksheet For Each sh In ActiveWorkbook.Worksheets On Error Resume Next sh.Cells.Font.Name = "Tahoma" On Error GoTo 0 Next sh End Sub Although, it seems to me if you set the font for the normal style to Tahoma, it should make that the default for blank cells unless the have previously been set to a different font. Another think you could do is go to a sheet that is formatted the way you want it. click on the intersection and do Edit=Copy, go to this sheet, select A1 and do Edit=PasteSpecial and select formats. If that does more than you want, you can close the workbook without saving changes. -- Regards, Tom Ogilvy "Paul Black" wrote in message ... Hi Norman, Thanks for the Reply. I First tried the Manual Method, and this did work Between Cells A1 and the Last Active Cell, But it Ignored Everything Between the Last Active Cell and Cell IV65536. I then tried the Macro and Got Exactly the Same Results. All the Best Paul "Norman Jones" wrote in message ... Hi Paul, Manually: Select a single cell | Hit the F5 function key | Special | Check Blanks OK With the blank cells now selected, apply your desired formatting. Repeat for each worksheet. Programmatically, try: Sub Tester() Dim sh As Worksheet For Each sh In ActiveWorkbook.Worksheets On Error Resume Next sh.Cells.SpecialCells(xlBlanks).Font.Name = "Tahoma" On Error GoTo 0 Next sh End Sub --- Regards, Norman "Paul Black" wrote in message ... Hi Everyone, I have been given a Spreadsheet which needs Updating. The Current ( Default on Excel for the Person that the Sheet Belongs to ) Font is Set to "Ariel". I have Managed to Change the Column Letters and Row Numbers from "Ariel" to "Tahoma" by using "Format", "Style" and then Modifying the Font. All the Cells in the Spreadsheet ( and Workbook ) that have Information and Formulas in are Either "Tahoma" or "Comic Sans MS" Font. What I would Ideally like is a way of Changing ALL the Empty "Ariel" Cells ( A1:IV65536) to Empty "Tahoma" Cells in Both the Worksheet AND the Workbook. I would like a Method of Achieving this Manually AND with a Macro if Possible Please. I am using XP and XL2002. All the Best Paul |
#22
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change Empty Cells Font for the Entire Workbook
Hi Paul,
I suspect at some stage, when the Normal font was Arial, entire columns or rows or all cells were formatted with Arial. This is not tautology. Try this with Normal font = Arial: - Select all cells (small square that intersects headers) - Click Arial in the drop down font list (simply that, nothing else) - Change Normal Font to Tahoma - All cells still have Arial - right? - Clear formats in some cells (Edit Clear Formats) - Font is now Tahoma - right? In your problematic sheet in which you have changed Normal font from Arial to Tahoma, select some cells that still have Arial and clear formats. If they change to Tahoma the conundrum is solved. Solution: Ctrl + End to select Last Cell Clear formats in all rows one below to 65536 (row header, ****+End down arrow) and columns to the right (it's much quicker to clear rows down first). F5 Special blanks clear formats. This should only take a few seconds per sheet. If you have many to do then similar with a simple macro. BTW, applying formats to entire rows or columns does not impact the Used Range. F5 Special Blanks only selects within the UR. Regards, Peter -----Original Message----- Thanks to Everyone who has tried to Solve my Problem, I think I will have to do it the Long Handed Way. so any entry in a new, unused cell will be Tahoma. Tom, Unfortunately this is NOT the Case. Even doing it the Long Handed Way, there are still going to be Problems, like if they were to Insert a Column, that Column would Automatically Default to the "Ariel" Font. Not to Worry, the Task will still be Done, but just take much longer than I anticipated. Once again, Thanks to Everyone for their Contributions. All the Best Paul "Tom Ogilvy" wrote in message ... You said: I have Managed to Change the Column Letters and Row Numbers from "Ariel" to "Tahoma" by using "Format", "Style" and then Modifying the Font. so any entry in a new, unused cell will be Tahoma. -- Regards, Tom Ogilvy "Paul Black" wrote in message ... Hi, Norman, Your Macro Works and Changes ALL the Cells from A1 to IV65536 to "Tahoma", Even those which have the Font of "Comic Sans MS" and "Verdana", which I want Left as they are. Tom, When the Spreadsheet was First Created in 2002, the Normal Font was Set to "Ariel". So ANY Input Automatically became "Ariel". Once I have Managed to Achieve my Goal, the Spreadsheet will be given back to the User, and then Any Additional Information Input ( Anywhere in the Workbook ) will Automatically be in the Font "Tahoma". Thanks also to Myrna Larson and swatsp0p for your Contributions. All the Best Paul "Norman Jones" wrote in message ... Hi Swatsp0p, I have no problem with the manual approach except that it is very substantially slower than the programmatic solution. Using my procedure, I was able to process a five sheet workbook in approximately the same time as I was able to process a single sheet manually. This, of course, presupposes the existence of the code. <g Incidentally, you could remove a redundant step from your suggestion: instead of making an entry in cell IV65536 and later deleting the entry, simply format it as Tahoma. No subsequent deletion is required and the requisite used range is established. That said, discussion as to the merits or demerits of one approach over another is moot to the extent that the solution represents the resolution of a problem that I would not expect to encounter. --- Regards, Norman "swatsp0p" wrote in message news:EFC198AF-5AA6-49E6-9F60- ... What happens if you put an entry in cell IV65536 then did: Select a single cell | Hit the F5 function key | Special | Check Blanks | OK With the blank cells now selected, apply your desired formatting. Once formatted, delete the entry in IV65536? "Norman Jones" wrote: Hi Paul, If you really to format ALL empty cells on each worksheet, you can try the following: Sub Tester() Dim sh As Worksheet For Each sh In ActiveWorkbook.Worksheets With sh If Intersect(.UsedRange, .Cells (Rows.Count, _ Columns.Count)) Is Nothing Then .Cells(Rows.Count, Columns.Count).Font.Name = "Tahoma" End If On Error Resume Next .Cells.SpecialCells(xlBlanks).Font.Name = "Tahoma" On Error GoTo 0 End With Next sh End Sub This is not likely to be excessively fast! --- Regards, Norman "Paul Black" wrote in message ... Thanks Myrna, I tried your Suggestion, it Worked for ALL Blank Cells from "A1" to the Last Cell with Something in. It Ignored from that Cell to Cell IV65536. All the Best Paul Myrna Larson wrote in message . .. Edit/Goto, click the Special button. Select Blanks. Then apply the formatting you want. To do this in a macro, turn on the macro recorder, do it manually, stop the recorder and look at the code it generated. On 9 Sep 2004 15:04:30 -0700, (Paul Black) wrote: Hi Tom, Thanks for the Reply. Your Macro does change ALL the Blank Cells ( A1:IV65536 )to "Tahoma", Unfortunately it also Changes Cells that have Data in. I Only want Blank Cells to be Changed. All the Best Paul "Tom Ogilvy" wrote in message ... Sub Tester() Dim sh As Worksheet For Each sh In ActiveWorkbook.Worksheets On Error Resume Next sh.Cells.Font.Name = "Tahoma" On Error GoTo 0 Next sh End Sub Although, it seems to me if you set the font for the normal style to Tahoma, it should make that the default for blank cells unless the have previously been set to a different font. Another think you could do is go to a sheet that is formatted the way you want it. click on the intersection and do Edit=Copy, go to this sheet, select A1 and do Edit=PasteSpecial and select formats. If that does more than you want, you can close the workbook without saving changes. -- Regards, Tom Ogilvy "Paul Black" wrote in message ... Hi Norman, Thanks for the Reply. I First tried the Manual Method, and this did work Between Cells A1 and the Last Active Cell, But it Ignored Everything Between the Last Active Cell and Cell IV65536. I then tried the Macro and Got Exactly the Same Results. All the Best Paul "Norman Jones" wrote in message ... Hi Paul, Manually: Select a single cell | Hit the F5 function key | Special | Check Blanks OK With the blank cells now selected, apply your desired formatting. Repeat for each worksheet. Programmatically, try: Sub Tester() Dim sh As Worksheet For Each sh In ActiveWorkbook.Worksheets On Error Resume Next sh.Cells.SpecialCells (xlBlanks).Font.Name = "Tahoma" On Error GoTo 0 Next sh End Sub --- Regards, Norman "Paul Black" wrote in message ... Hi Everyone, I have been given a Spreadsheet which needs Updating. The Current ( Default on Excel for the Person that the Sheet Belongs to ) Font is Set to "Ariel". I have Managed to Change the Column Letters and Row Numbers from "Ariel" to "Tahoma" by using "Format", "Style" and then Modifying the Font. All the Cells in the Spreadsheet ( and Workbook ) that have Information and Formulas in are Either "Tahoma" or "Comic Sans MS" Font. What I would Ideally like is a way of Changing ALL the Empty "Ariel" Cells ( A1:IV65536) to Empty "Tahoma" Cells in Both the Worksheet AND the Workbook. I would like a Method of Achieving this Manually AND with a Macro if Possible Please. I am using XP and XL2002. All the Best Paul . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I change the font to all caps for the entire worksheet? | Excel Worksheet Functions | |||
XY marker change for entire workbook | Charts and Charting in Excel | |||
Change font color across entire row | Excel Discussion (Misc queries) | |||
Change Print Quality for entire workbook | Setting up and Configuration of Excel | |||
Highlight entire document and try to change font - won't change. | Excel Discussion (Misc queries) |