gheyman
Well-known Member
- Joined
- Nov 14, 2005
- Messages
- 2,347
- Office Version
- 365
- Platform
- Windows
I want to add the value (Number) from a cell within my message. How do you this? Thanks for the help
Code:
Sub RunValidation()
Sheets("Step 2").Visible = True
Sheets("Step 2").Activate
TransferPartNumbers
Range("Q16").Select
Selection.ListObject.QueryTable.Refresh BackgroundQuery:=False
Range("G16").Select
Selection.ListObject.QueryTable.Refresh BackgroundQuery:=False
'*********************************
'Enter Formulas
'********************************
Range("C13").Select
ActiveCell.FormulaR1C1 = _
"=CONCATENATE(""Count: "", SUBTOTAL(103,Table10[Enter Your Part Numbers]))"
Range("G13").Select
ActiveCell.FormulaR1C1 = _
"=CONCATENATE(""Count: "", SUBTOTAL(103,SelectedPartsValidation[ItemID]))"
Range("Q13").Select
ActiveCell.FormulaR1C1 = _
"=CONCATENATE(""Count: "", SUBTOTAL(103,MismatchedPartsList[Mismatched]))"
Range("H13").Select
ActiveCell.FormulaR1C1 = _
"=IF(SUBTOTAL(103,Table10[Enter Your Part Numbers])>SUBTOTAL(103,SelectedPartsValidation[ItemID]),""You have either entered P/N's incorrectly, entered duplicates or entered P/N's not in CostPoint, please check"","""")"
'***********************************
'Paste Values for Formulas
'***********************************
Calculate
Range("C13").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("G13:H13").Select
Application.CutCopyMode = False
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("Q13").Select
Application.CutCopyMode = False
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
'**************************
'Reformat Table Areas
'**************************
Sheets("Other Tables").Calculate
If Sheets("Other Tables").Range("I3").Value > 0 Then
MsgBox "You have X Part(s) in your list that are mismatched. These Parts are not in CostPoint or you entered Duplicates"
Else
End If
End Sub