With VBA I am applying a formula which is to return a Part Code Number as a text label to a cell and the formula is copied down a range and converted to Values only. The formula includes prepending “’” if a number is detected.
Problem: A few entries do not have any alphabetic characters, only digits and Excel treats these as a number.
Temporary solution: I enter the formula directly to the sheet and copy it down then convert to values.
Help required: what more can I do to have VBA perform this action without Excel converting to a number.
Brendan
Problem: A few entries do not have any alphabetic characters, only digits and Excel treats these as a number.
Temporary solution: I enter the formula directly to the sheet and copy it down then convert to values.
Help required: what more can I do to have VBA perform this action without Excel converting to a number.
Code:
col = "Q" str = "=tplQ"
.Range(col & "5").Formula = str
.Range(col & "5:" & col & z).FillDown
.Range(col & "5:" & col & z).Calculate
.Range(col & "5:" & col & z).Value = .Range(col & "5:" & col & z).Value
Brendan
Last edited by a moderator: