Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 112
Default Numbers of minutes in Verizon Wireless phone bill

I've copy/pasted the web page array of the details of my phone calls
from my on-line verizon cell phone bill into an Excel worksheet. The
number shown for the minutes of duration of each call doesn't equate
to an Excel number and the SUM() function reports zero. What's a line
of code (or other process) that will convert these numeric-appearing
entries into actual numbers? The text in the editing bar is two
spaces followed by a cipher, e.g. " 1" for one minute, so that the
cipher appears just to the right of center.

Neither of the following work. They both convert to the number zero
instead of to the actual number of minutes.

ActiveCell.Value = Val(LTrim(ActiveCell.Value))
ActiveCell.Value = LTrim(ActiveCell.Value)

Using ActiveCell.Text for the right-hand expression also doesn't seem
to work.

The cell formatting in the column has been converted to number, zero
decimal places.

Thanks for any help.

Fred Holmes
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 112
Default Numbers of minutes in Verizon Wireless phone bill

These cells in the worksheet are really strange. If I insert another
column alongside the original column and use the N() formula to
extract the number, e.g. N(G12) is the formula in H12, it reports zero
in all instances. ???

On Wed, 27 Apr 2005 10:55:37 -0400, Fred Holmes wrote:

I've copy/pasted the web page array of the details of my phone calls
from my on-line verizon cell phone bill into an Excel worksheet. The
number shown for the minutes of duration of each call doesn't equate
to an Excel number and the SUM() function reports zero. What's a line
of code (or other process) that will convert these numeric-appearing
entries into actual numbers? The text in the editing bar is two
spaces followed by a cipher, e.g. " 1" for one minute, so that the
cipher appears just to the right of center.

Neither of the following work. They both convert to the number zero
instead of to the actual number of minutes.

ActiveCell.Value = Val(LTrim(ActiveCell.Value))
ActiveCell.Value = LTrim(ActiveCell.Value)

Using ActiveCell.Text for the right-hand expression also doesn't seem
to work.

The cell formatting in the column has been converted to number, zero
decimal places.

Thanks for any help.

Fred Holmes


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Numbers of minutes in Verizon Wireless phone bill

Fred,

Try this as well

With ActiveCell
.Replace Chr(160), ""
.Value = Val(LTrim(ActiveCell.Value))
End With


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Fred Holmes" wrote in message
...
I've copy/pasted the web page array of the details of my phone calls
from my on-line verizon cell phone bill into an Excel worksheet. The
number shown for the minutes of duration of each call doesn't equate
to an Excel number and the SUM() function reports zero. What's a line
of code (or other process) that will convert these numeric-appearing
entries into actual numbers? The text in the editing bar is two
spaces followed by a cipher, e.g. " 1" for one minute, so that the
cipher appears just to the right of center.

Neither of the following work. They both convert to the number zero
instead of to the actual number of minutes.

ActiveCell.Value = Val(LTrim(ActiveCell.Value))
ActiveCell.Value = LTrim(ActiveCell.Value)

Using ActiveCell.Text for the right-hand expression also doesn't seem
to work.

The cell formatting in the column has been converted to number, zero
decimal places.

Thanks for any help.

Fred Holmes



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 112
Default Numbers of minutes in Verizon Wireless phone bill

Oh_Kay. . . !

It works, but why the heck do they do that? Or is it just part of
the code that the html frames use?

Many, many thanks for your help.

Fred Holmes


On Wed, 27 Apr 2005 16:10:34 +0100, "Bob Phillips"
wrote:

Fred,

Try this as well

With ActiveCell
.Replace Chr(160), ""
.Value = Val(LTrim(ActiveCell.Value))
End With


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 112
Default Numbers of minutes in Verizon Wireless phone bill

OK, Now I'm trying to do the following:


Sub Convert_to_value_3()
Dim c As Cell
For Each c In Selection
With ActiveCell
.Replace Chr(160), ""
.Value = Val(LTrim(ActiveCell.Value))
End With
Next c
End Sub

"Cell" doesn't work as an object type. If I substitute "Range" for
"Cell" the code will process only the first cell in the selected
Range, not all cells in the selected range.

Many thanks for any help.

Fred Holmes


On Wed, 27 Apr 2005 16:10:34 +0100, "Bob Phillips"
wrote:

Fred,

Try this as well

With ActiveCell
.Replace Chr(160), ""
.Value = Val(LTrim(ActiveCell.Value))
End With




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Numbers of minutes in Verizon Wireless phone bill


Sub Convert_to_value_3()
Dim c As Range
For Each c In Selection
With c
.Replace Chr(160), ""
.Value = Val(LTrim(ActiveCell.Value))
End With
Next c
End Sub


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Fred Holmes" wrote in message
...
OK, Now I'm trying to do the following:


Sub Convert_to_value_3()
Dim c As Cell
For Each c In Selection
With ActiveCell
.Replace Chr(160), ""
.Value = Val(LTrim(ActiveCell.Value))
End With
Next c
End Sub

"Cell" doesn't work as an object type. If I substitute "Range" for
"Cell" the code will process only the first cell in the selected
Range, not all cells in the selected range.

Many thanks for any help.

Fred Holmes


On Wed, 27 Apr 2005 16:10:34 +0100, "Bob Phillips"
wrote:

Fred,

Try this as well

With ActiveCell
.Replace Chr(160), ""
.Value = Val(LTrim(ActiveCell.Value))
End With




  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Numbers of minutes in Verizon Wireless phone bill

It's done by the HTML, non-breaking spaces used to align data.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Fred Holmes" wrote in message
...
Oh_Kay. . . !

It works, but why the heck do they do that? Or is it just part of
the code that the html frames use?

Many, many thanks for your help.

Fred Holmes


On Wed, 27 Apr 2005 16:10:34 +0100, "Bob Phillips"
wrote:

Fred,

Try this as well

With ActiveCell
.Replace Chr(160), ""
.Value = Val(LTrim(ActiveCell.Value))
End With




  #8   Report Post  
Posted to microsoft.public.excel.programming
Ed Ed is offline
external usenet poster
 
Posts: 399
Default Numbers of minutes in Verizon Wireless phone bill

Fred:

I would use
Dim rng As Range
Dim c As Range
Set rng = Selection
For Each c in rng.Cells

HTH
Ed

"Fred Holmes" wrote in message
...
OK, Now I'm trying to do the following:


Sub Convert_to_value_3()
Dim c As Cell
For Each c In Selection
With ActiveCell
.Replace Chr(160), ""
.Value = Val(LTrim(ActiveCell.Value))
End With
Next c
End Sub

"Cell" doesn't work as an object type. If I substitute "Range" for
"Cell" the code will process only the first cell in the selected
Range, not all cells in the selected range.

Many thanks for any help.

Fred Holmes


On Wed, 27 Apr 2005 16:10:34 +0100, "Bob Phillips"
wrote:

Fred,

Try this as well

With ActiveCell
.Replace Chr(160), ""
.Value = Val(LTrim(ActiveCell.Value))
End With




  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 112
Default Numbers of minutes in Verizon Wireless phone bill

Well, while the single-cell code works, the following attempt to
process a range fails. The code runs, but it produces the value "2"
in every cell in the selected range, no matter what the actual text
number in that cell happens to be.

Thanks for any help,

Fred Holmes

On Wed, 27 Apr 2005 16:46:56 +0100, "Bob Phillips"
wrote:


Sub Convert_to_value_3()
Dim c As Range
For Each c In Selection
With c
.Replace Chr(160), ""
.Value = Val(LTrim(ActiveCell.Value))
End With
Next c
End Sub


  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Numbers of minutes in Verizon Wireless phone bill

Sorry, missed a bit

Sub Convert_to_value_3()
Dim c As Range
For Each c In Selection
With c
.Replace Chr(160), ""
.Value = Val(LTrim(.Value))
End With
Next c
End Sub


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Fred Holmes" wrote in message
...
Well, while the single-cell code works, the following attempt to
process a range fails. The code runs, but it produces the value "2"
in every cell in the selected range, no matter what the actual text
number in that cell happens to be.

Thanks for any help,

Fred Holmes

On Wed, 27 Apr 2005 16:46:56 +0100, "Bob Phillips"
wrote:


Sub Convert_to_value_3()
Dim c As Range
For Each c In Selection
With c
.Replace Chr(160), ""
.Value = Val(LTrim(ActiveCell.Value))
End With
Next c
End Sub






  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default Numbers of minutes in Verizon Wireless phone bill


Sub Convert_to_value_3()
Dim c As Range
For Each c In Selection
With c
.Replace Chr(160), ""
.Value = Val(LTrim(c.Value))
End With
Next c
End Sub

--
HTH,
Bernie
MS Excel MVP


"Fred Holmes" wrote in message
...
Well, while the single-cell code works, the following attempt to
process a range fails. The code runs, but it produces the value "2"
in every cell in the selected range, no matter what the actual text
number in that cell happens to be.

Thanks for any help,

Fred Holmes

On Wed, 27 Apr 2005 16:46:56 +0100, "Bob Phillips"
wrote:


Sub Convert_to_value_3()
Dim c As Range
For Each c In Selection
With c
.Replace Chr(160), ""
.Value = Val(LTrim(ActiveCell.Value))
End With
Next c
End Sub




  #12   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 112
Default Numbers of minutes in Verizon Wireless phone bill

Even with the below-suggested fix, when I run the code, the value
produced in every cell in the range is "2" regardless of the text
number that is actually in the cell. Running Office 2000 on Win 2000
SP-4 with "all" fixes applied.

Fred Holmes

On Wed, 27 Apr 2005 08:51:29 -0700, "Ed"
wrote:

Fred:

I would use
Dim rng As Range
Dim c As Range
Set rng = Selection
For Each c in rng.Cells

HTH
Ed

"Fred Holmes" wrote in message
.. .
OK, Now I'm trying to do the following:


Sub Convert_to_value_3()
Dim c As Cell
For Each c In Selection
With ActiveCell
.Replace Chr(160), ""
.Value = Val(LTrim(ActiveCell.Value))
End With
Next c
End Sub

"Cell" doesn't work as an object type. If I substitute "Range" for
"Cell" the code will process only the first cell in the selected
Range, not all cells in the selected range.

Many thanks for any help.

Fred Holmes


On Wed, 27 Apr 2005 16:10:34 +0100, "Bob Phillips"
wrote:

Fred,

Try this as well

With ActiveCell
.Replace Chr(160), ""
.Value = Val(LTrim(ActiveCell.Value))
End With




  #13   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 112
Default Numbers of minutes in Verizon Wireless phone bill

Earlier message is incorrect. With this change it now works. Al
works.

I modified the wrong code the first time, and had With c instead of
With ActiveCell

Many, Many thanks for all your help.

Fred Homes

On Wed, 27 Apr 2005 08:51:29 -0700, "Ed"
wrote:

Fred:

I would use
Dim rng As Range
Dim c As Range
Set rng = Selection
For Each c in rng.Cells

HTH
Ed

"Fred Holmes" wrote in message
.. .
OK, Now I'm trying to do the following:


Sub Convert_to_value_3()
Dim c As Cell
For Each c In Selection
With ActiveCell
.Replace Chr(160), ""
.Value = Val(LTrim(ActiveCell.Value))
End With
Next c
End Sub

"Cell" doesn't work as an object type. If I substitute "Range" for
"Cell" the code will process only the first cell in the selected
Range, not all cells in the selected range.

Many thanks for any help.

Fred Holmes


On Wed, 27 Apr 2005 16:10:34 +0100, "Bob Phillips"
wrote:

Fred,

Try this as well

With ActiveCell
.Replace Chr(160), ""
.Value = Val(LTrim(ActiveCell.Value))
End With




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
totalling phone minutes rebecca Excel Worksheet Functions 5 January 23rd 08 01:10 AM
Keeping record of clients and job numbers per bill? Chhaya Excel Discussion (Misc queries) 1 September 18th 06 12:55 PM
How to add CellPhone minutes from a bill to a sheet like 603:57? TPS_Reports Excel Discussion (Misc queries) 4 May 4th 06 10:04 AM
How can I cross reference phone numbers with existing phone numbe. John Excel Discussion (Misc queries) 1 February 11th 05 04:39 PM
Words > Numbers (i.e. Vanity Phone Numbers) function Don Excel Worksheet Functions 1 December 29th 04 06:10 PM


All times are GMT +1. The time now is 08:55 PM.

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"