Thread
:
Another Easy Question
View Single Post
#
14
Posted to microsoft.public.excel.programming
Don Guillett[_2_]
external usenet poster
Posts: 1,522
Another Easy Question
However, if you have text or the "dreaded space bar" in the cell then you
will still get 1000 ......
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"MovingBeyondtheRecordButton"
.com wrote in message
...
I decide to use:
For Each F In Worksheets("Sheet1").Range("A4:A40,F4:F40")
If F.Value < "" Then
Num = 1000 & F.Value
'Then take Num and run Sql Query
"Don Guillett" wrote:
I have no idea what you mean by "give a name". You would NOT want to name
each cell.
Sub addto()
dim f as range
For Each f In Worksheets("Sheet30").Range("A4:A40", "F4:F40")
If Len(Application.Trim(f)) 0 And IsNumeric(f) Then
f.Value = 1000 & f.Value
End If
Next f
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"MovingBeyondtheRecordButton"
.com wrote in message
...
How do I take the value from each cell defined in the
range("A4:A40,F4:F40")
and place 1000 before the value and give this new number a name.
Example:
Number in A4 is 37984
I want to use 100037984
I have tried...
Dim F As Range
Dim myNum As Variant
Dim Num As Long
Worksheets("Sheet1").Activate
For Each F In Range("A4:A40", "F4:F40")
myNum = F.Value
Num = myNum & 1000
.
Reply With Quote
Don Guillett[_2_]
View Public Profile
Find all posts by Don Guillett[_2_]