Forum Discussion
Davidm54
Feb 02, 2021Brass Contributor
The dreaded Apostrophe is turning numbers into text in a forms spreadsheet
I answered my first question by checking one of my other sheets, but this one is a bit trickier. When people use MS Forms, even for questions I have added restrictions to so it must be a number, ...
- Feb 02, 2021
I guess the Form is linked to Excel file hosted on SharePoint site. That issue is known for years, at least two workarounds
1) If you have column [Question 1] which have number as text, you may add to the table additional column Q1 as =@[Question 1]*1, or =CLEAN(@[Question 1])*1, etc and work with these columns. Adding of additional columns into the forms table won't crash the process.
2) Instead of linked table use Power Automate which is triggered by form submit and adds rows to the table in your file. In this case not linked with the Form. Transformation could be done within Power Automate flow.
PeterBartholomew1
Feb 02, 2021Silver Contributor
Sub TextToNumber()
Dim LO As ListObject
Set LO = ActiveSheet.ListObjects(1)
With LO.ListColumns(1).Range
.NumberFormat = "General"
.Value = .Value
End With
End Sub
[The Table name or column name could be used in place of its index]
Davidm54
Feb 03, 2021Brass Contributor
Thanks. I'll definitely look at using that, this won't be the last time forms is being used.