Personal.xls sheet

matthewR
5StarLounger
Posts: 627
Joined: 03 Feb 2010, 15:02

Personal.xls sheet

Post by matthewR »

A person I work with - her Personal.xls sheet is missing. Under Windows the unhide option is dimmed out. Is there a way to get her personal.xls back or does she have to recreate her Personal.xls and copy the macros back? Her macros are gone.

User avatar
HansV
Administrator
Posts: 78488
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Personal.xls sheet

Post by HansV »

Let her do a search in her profile (C:\Documents and Settings\<username> in Windows XP, C:\Users\<username> in Windows Vista and 7) for Personal.xls. Make sure that she displays hidden files and folders.
The default location is C:\Documents and Settings\<username>\Application Data\Microsoft\Excel\XLSTART or C:\Users\<username>\AppData\Roaming\Microsoft\Excel\XLSTART, depending on the Windows version.
If Personal.xls is found in another location, move it to the default location.
If Personal.xls is not found, does she have a backup of her profile? If so, look there. Otherwise, she'll have to recreate Personal.xls.
Best wishes,
Hans

matthewR
5StarLounger
Posts: 627
Joined: 03 Feb 2010, 15:02

Re: Personal.xls sheet

Post by matthewR »

I found the Personal.xls in the disabled items under help. Now when she runs the following macro instead of filling in the blanks, she gets R[-1]C.

Sub FillBlanks()
Dim rng As Range
On Error Resume Next
Set rng = ActiveSheet.UsedRange.Columns("A:B")
With rng
'.NumberFormat = "General"
.SpecialCells(xlCellTypeBlanks).FormulaR1C1 = "=R[-1]C"
.Copy
.PasteSpecial xlPasteValues
End With
Set rng = Nothing

End Sub

User avatar
HansV
Administrator
Posts: 78488
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Personal.xls sheet

Post by HansV »

Before running the macro, make sure that the number format isn't set to Text.
Best wishes,
Hans

matthewR
5StarLounger
Posts: 627
Joined: 03 Feb 2010, 15:02

Re: Personal.xls sheet

Post by matthewR »

That was it. There wasn't any formatting so I selected General and the macro worked. Thanks you.

User avatar
HansV
Administrator
Posts: 78488
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Personal.xls sheet

Post by HansV »

The line

.NumberFormat = "General"

has been commented out in the macro by inserting an apostrophe in front of it. If you remove the apostrophe, the macro should work even if the cells have been formatted as text.
Best wishes,
Hans