Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Fahimah Khan   on Dec 21 In MS Office Category.

  
Question Answered By: Khadeeja Malik   on Dec 21

Thanks for the try on this but I was able to figure it out. It IS a
bit quirky but it works. Basically you apply the "PasteSpecial"
function with a multiply Operation. You have to have a "1" in a cell
somewhere for this to work  (I just put it in and hid the row). The
VBA code looks like this:

Private Sub FormFieldName_Change()
Worksheets("SheetName").Activate
Activesheet.Range("CellYouAreEnteringTo").Value = FormFieldName
Activesheet.Range("CellYouHave1in").Select
Selection.NumberFormat = "General"
Selection.Copy
Activesheet.pastespecial Paste:=xlPasteAll,
Operation:=xlMultiply, SkipBlanks:=False, Transpose:=False
Selection.NumberFormat = "FormatYouWantNumbersToBe"

Share: 

 

This Question has 6 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on How do you change a text field to a numeric field? Or get search suggestion and latest updates.


Tagged: