Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

NAME? in cell with formula 1

Status
Not open for further replies.

vba317

Programmer
Mar 5, 2009
708
US
Today I started getting an #NAME? error in any cells that I update in Column C. This is the spreadsheet that I added the code form yesterday. The formula that is in cell B8 the formula is =WORKDAY(B5,C8-1).
The cell B5 has the date in it 1/31/2013. The cell C8 has the number 1 in it. Somehow is the worksheet change event I added in yesterday messing things up?

Tom
 
Hi,

Exactly what formula is in the cells on question?

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
=WORKDAY(B5,C8-1)

the code in the change event is

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
'Excel Worksheet Change event
Application.EnableEvents = False
If Not (Application.Intersect(Target, Range("D8:H105")) Is Nothing) Then
    With Target
        If Not .HasFormula Then
            .Value = UCase(.Value)
        End If
    End With
End If
Application.EnableEvents = True
End Sub
 
I am confused. You stated, "Today I started getting an #NAME? error in any cells that I update in Column C." Than you stated, "The formula that is in cell B8 the formula is =WORKDAY(B5,C8-1)."

That is why I asked what the formula was, as B8 is obviously not in column C.

Your workday formula is not in column C where you are getting the #Name error???

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
The formula is in the B column and that is where the NAME error is.
The C Column is where I am changing the number to represent what workday of the month it is.

Tom
 
You may need to re-load Excel, as it seems that an object library may be missing.

Does this happen for other date formulas?

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
You are correct. How do I reload? I tried to uncheck and than recheck the analysis toolpak and th analysis toolpak vba but this didnt make a difference.

Tom
 
What is the excel version and what are security settings?

combo
 
I had IT remove excel and reinstall it and now everything works great. Thanks Skip once again.

Tom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top