Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Changing Text into Numbers, using VBA

When importing from a FoxPro database, all the charactors come over as text. When I try to sum these numbers, it will not sum because excel thinks they are text. Isn't there a way to convert all these to numbers through vba?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Changing Text into Numbers, using VBA

Hi
one way (non-VBA):
select and empty cell and copy it
- select your imported values
- goto 'Edit - Paste Special' and choose 'Add'

--
Regards
Frank Kabel
Frankfurt, Germany


Cecil wrote:
When importing from a FoxPro database, all the charactors come over
as text. When I try to sum these numbers, it will not sum because
excel thinks they are text. Isn't there a way to convert all these
to numbers through vba?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Changing Text into Numbers, using VBA

No offence Frank, but all the advice I have gotten from you has been shall we say lame. There is 20 ways to manually do the text to numbers thing, I can do that. I am looking to do it with vba so I don't have to do it manually. Thanks anyway

----- Frank Kabel wrote: ----

H
one way (non-VBA)
select and empty cell and copy i
- select your imported value
- goto 'Edit - Paste Special' and choose 'Add

--
Regard
Frank Kabe
Frankfurt, German


Cecil wrote
When importing from a FoxPro database, all the charactors come ove
as text. When I try to sum these numbers, it will not sum becaus
excel thinks they are text. Isn't there a way to convert all thes
to numbers through vba?


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default Changing Text into Numbers, using VBA

Cecil, for a person looking for help your attitude has has been rather shall
we say lame?

--

Vasant


"cecil" wrote in message
...
No offence Frank, but all the advice I have gotten from you has been shall

we say lame. There is 20 ways to manually do the text to numbers thing, I
can do that. I am looking to do it with vba so I don't have to do it
manually. Thanks anyway.

----- Frank Kabel wrote: -----

Hi
one way (non-VBA):
select and empty cell and copy it
- select your imported values
- goto 'Edit - Paste Special' and choose 'Add'

--
Regards
Frank Kabel
Frankfurt, Germany


Cecil wrote:
When importing from a FoxPro database, all the charactors come over
as text. When I try to sum these numbers, it will not sum because
excel thinks they are text. Isn't there a way to convert all these
to numbers through vba?




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Changing Text into Numbers, using VBA

Sub ffff()
Dim C As Range
For Each C In Range("c1:c10")
C.NumberFormat = "0"
C.Value = C.Value
Next
End Su

--
Message posted from http://www.ExcelForum.com



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Changing Text into Numbers, using VBA

So
try something like
sub foo()
dim rng as range
dim cell as range
set rng = selection
for each cell in rng
if cell.value<""
cell.numberformat="General"
cell.value=cell.value
end if
next
end sub

----
you may consider skipping such words as 'lame' as this won't help you
getting advice


--
Regards
Frank Kabel
Frankfurt, Germany


cecil wrote:
No offence Frank, but all the advice I have gotten from you has been
shall we say lame. There is 20 ways to manually do the text to
numbers thing, I can do that. I am looking to do it with vba so I
don't have to do it manually. Thanks anyway.

----- Frank Kabel wrote: -----

Hi
one way (non-VBA):
select and empty cell and copy it
- select your imported values
- goto 'Edit - Paste Special' and choose 'Add'

--
Regards
Frank Kabel
Frankfurt, Germany


Cecil wrote:
When importing from a FoxPro database, all the charactors come

over as text. When I try to sum these numbers, it will not
sum because excel thinks they are text. Isn't there a way to
convert all these to numbers through vba?


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing A Column Of Text numbers To True Numbers: How ? Robert11[_3_] New Users to Excel 2 March 4th 09 09:08 PM
Changing text to numbers Schwimms Excel Discussion (Misc queries) 0 November 14th 07 04:51 PM
changing numbers in a text string in a new cell Xhawk57 Excel Discussion (Misc queries) 4 May 16th 07 06:22 PM
Changing numbers to text Des Excel Worksheet Functions 1 April 9th 07 08:58 AM
Changing Text to Numbers Hawksby Excel Discussion (Misc queries) 3 December 14th 06 06:23 PM


All times are GMT +1. The time now is 09:18 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"