In this example, the cell would not be copy paste valued since the left three spaces are "=IF" and not "=HP". The code I presently have is at the bottom of this message

....would the proper correction be

**For Each z In Selection**

If CONTAINS(z.FormulaR1C1) <> "HPLNK" Then

If CONTAINS(z.FormulaR1C1) = "HP" Then

If CONTAINS(z.FormulaR1C1) <> "HPLNK" Then

If CONTAINS(z.FormulaR1C1) = "HP" Then

Thanks for your help,

Risk

***** ORIGINAL ******

Sub ValueHPAll()

TxtMsg = "You have selected to value all Hyperion formula's in this workbook. If you wish to proceed please press OK"

y = MsgBox(TxtMsg, vbOKCancel, "Proceeding with valuing Hyperion formula's.")

If y = 1 Then

For Each x In Worksheets

Sheets(x.Name).Activate

Range("a1").Select

ActiveCell.SpecialCells(xlLastCell).Select

LastCell = ActiveCell.Address

Range("a1:" & LastCell).Select

**For Each z In Selection**

If Left(z.FormulaR1C1, 7) <> "=HPLNK" Then

If Left(z.FormulaR1C1, 3) = "=HP" Then

If Left(z.FormulaR1C1, 7) <> "=HPLNK" Then

If Left(z.FormulaR1C1, 3) = "=HP" Then

z.Copy

z.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _

:=False, Transpose:=False

End If

End If

Next z

Range("a1").Select

Next x

Else

MsgBox "You have chosen to cancel this process"

End If

End Sub