Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,814
Default Convert variable #'s in a gen. format to a # that can be used w/ma

I have this data that is pasted to my worksheet:

Period: 01/23/2010 to 01/29/2010 - Days: 6
It is in general format. The day numbers will always be in the last, last 2
, or last 3 positions.
Depending on the period, the days may be any # up to the 365.
I need to use that day #, be it 6, or 25, or 147, whatever, as a divisor of
another number. E.g. if 6, then 1234 / 6 = 206
if 25, then 5678 / 25 = 227, etc/
The variable #'s will be in the same cell, so I basically want: E29/6 or
E29/25, or E29/147, etc.
Basically, those general formatted #'s converted to a usable/divisable #.

Thanks,

Steve


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,240
Default Convert variable #'s in a gen. format to a # that can be usedw/ma

Steve wrote:
I have this data that is pasted to my worksheet:

Period: 01/23/2010 to 01/29/2010 - Days: 6
It is in general format. The day numbers will always be in the last, last 2
, or last 3 positions.
Depending on the period, the days may be any # up to the 365.
I need to use that day #, be it 6, or 25, or 147, whatever, as a divisor of
another number. E.g. if 6, then 1234 / 6 = 206
if 25, then 5678 / 25 = 227, etc/
The variable #'s will be in the same cell, so I basically want: E29/6 or
E29/25, or E29/147, etc.
Basically, those general formatted #'s converted to a usable/divisable #.

Thanks,

Steve




One way:

=--TRIM(RIGHT(SUBSTITUTE(A1," ",REPT(" ",10)),10))
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,814
Default Convert variable #'s in a gen. format to a # that can be used

I'm getting a #value!
A1 is where my general format data is, correct ?

"Glenn" wrote:

Steve wrote:
I have this data that is pasted to my worksheet:

Period: 01/23/2010 to 01/29/2010 - Days: 6
It is in general format. The day numbers will always be in the last, last 2
, or last 3 positions.
Depending on the period, the days may be any # up to the 365.
I need to use that day #, be it 6, or 25, or 147, whatever, as a divisor of
another number. E.g. if 6, then 1234 / 6 = 206
if 25, then 5678 / 25 = 227, etc/
The variable #'s will be in the same cell, so I basically want: E29/6 or
E29/25, or E29/147, etc.
Basically, those general formatted #'s converted to a usable/divisable #.

Thanks,

Steve




One way:

=--TRIM(RIGHT(SUBSTITUTE(A1," ",REPT(" ",10)),10))
.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,240
Default Convert variable #'s in a gen. format to a # that can be used

Yes, A1 should have "Period: 01/23/2010 to 01/29/2010 - Days: 6". You
probably have trailing spaces in your data, which could cause the #Value! error.
Try this instead:

B1 =--RIGHT(SUBSTITUTE(TRIM(A1)," ",REPT(" ",3)),3)

Steve wrote:
I'm getting a #value!
A1 is where my general format data is, correct ?

"Glenn" wrote:

Steve wrote:
I have this data that is pasted to my worksheet:

Period: 01/23/2010 to 01/29/2010 - Days: 6
It is in general format. The day numbers will always be in the last, last 2
, or last 3 positions.
Depending on the period, the days may be any # up to the 365.
I need to use that day #, be it 6, or 25, or 147, whatever, as a divisor of
another number. E.g. if 6, then 1234 / 6 = 206
if 25, then 5678 / 25 = 227, etc/
The variable #'s will be in the same cell, so I basically want: E29/6 or
E29/25, or E29/147, etc.
Basically, those general formatted #'s converted to a usable/divisable #.

Thanks,

Steve



One way:

=--TRIM(RIGHT(SUBSTITUTE(A1," ",REPT(" ",10)),10))
.

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,814
Default Convert variable #'s in a gen. format to a # that can be used

This produced :6
I changed the 3's to 2's and got the 6, but I don't think my fix will
account for 2 or 3 digit numbers, will it ? Same as other, taking a number in
cell E19, and dividing by the resulting 6, still produces a #value!


"Glenn" wrote:

Yes, A1 should have "Period: 01/23/2010 to 01/29/2010 - Days: 6". You
probably have trailing spaces in your data, which could cause the #Value! error.
Try this instead:

B1 =--RIGHT(SUBSTITUTE(TRIM(A1)," ",REPT(" ",3)),3)

Steve wrote:
I'm getting a #value!
A1 is where my general format data is, correct ?

"Glenn" wrote:

Steve wrote:
I have this data that is pasted to my worksheet:

Period: 01/23/2010 to 01/29/2010 - Days: 6
It is in general format. The day numbers will always be in the last, last 2
, or last 3 positions.
Depending on the period, the days may be any # up to the 365.
I need to use that day #, be it 6, or 25, or 147, whatever, as a divisor of
another number. E.g. if 6, then 1234 / 6 = 206
if 25, then 5678 / 25 = 227, etc/
The variable #'s will be in the same cell, so I basically want: E29/6 or
E29/25, or E29/147, etc.
Basically, those general formatted #'s converted to a usable/divisable #.

Thanks,

Steve



One way:

=--TRIM(RIGHT(SUBSTITUTE(A1," ",REPT(" ",10)),10))
.

.



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,240
Default Convert variable #'s in a gen. format to a # that can be used

What EXACTLY is in A1 (or whatever cell it is that you are looking at)?

Maybe try this, which assumes you are just subtracting the first date from the
second date to get "Days":

=MID(A1,FIND(" to ",A1)+4,11)-MID(A1,FIND(" to ",A1)-10,11)

As for your other problem, put this in a blank cell and tell us what the result is:

=ISNUMBER(E19)


Steve wrote:
This produced :6
I changed the 3's to 2's and got the 6, but I don't think my fix will
account for 2 or 3 digit numbers, will it ? Same as other, taking a number in
cell E19, and dividing by the resulting 6, still produces a #value!


"Glenn" wrote:

Yes, A1 should have "Period: 01/23/2010 to 01/29/2010 - Days: 6". You
probably have trailing spaces in your data, which could cause the #Value! error.
Try this instead:

B1 =--RIGHT(SUBSTITUTE(TRIM(A1)," ",REPT(" ",3)),3)

Steve wrote:
I'm getting a #value!
A1 is where my general format data is, correct ?

"Glenn" wrote:

Steve wrote:
I have this data that is pasted to my worksheet:

Period: 01/23/2010 to 01/29/2010 - Days: 6
It is in general format. The day numbers will always be in the last, last 2
, or last 3 positions.
Depending on the period, the days may be any # up to the 365.
I need to use that day #, be it 6, or 25, or 147, whatever, as a divisor of
another number. E.g. if 6, then 1234 / 6 = 206
if 25, then 5678 / 25 = 227, etc/
The variable #'s will be in the same cell, so I basically want: E29/6 or
E29/25, or E29/147, etc.
Basically, those general formatted #'s converted to a usable/divisable #.

Thanks,

Steve


One way:

=--TRIM(RIGHT(SUBSTITUTE(A1," ",REPT(" ",10)),10))
.

.

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Convert variable #'s in a gen. format to a # that can be used w/ma

One way...

Assuming the word "Days:" is *always* present.

=--MID(A1,SEARCH("Days:",A1)+5,5)

--
Biff
Microsoft Excel MVP


"Steve" wrote in message
...
I have this data that is pasted to my worksheet:

Period: 01/23/2010 to 01/29/2010 - Days: 6
It is in general format. The day numbers will always be in the last, last
2
, or last 3 positions.
Depending on the period, the days may be any # up to the 365.
I need to use that day #, be it 6, or 25, or 147, whatever, as a divisor
of
another number. E.g. if 6, then 1234 / 6 = 206
if 25, then 5678 / 25 = 227, etc/
The variable #'s will be in the same cell, so I basically want: E29/6 or
E29/25, or E29/147, etc.
Basically, those general formatted #'s converted to a usable/divisable #.

Thanks,

Steve




  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,814
Default Convert variable #'s in a gen. format to a # that can be used

I do believe the "Days" will always be present, and your formula works to
produce either the single #, tens, or hundreds, but when I use that result as
a divisor, it still produces a #value!
E.g. Formula result is 6(in J3).... e19/j3 = #value!

"T. Valko" wrote:

One way...

Assuming the word "Days:" is *always* present.

=--MID(A1,SEARCH("Days:",A1)+5,5)

--
Biff
Microsoft Excel MVP


"Steve" wrote in message
...
I have this data that is pasted to my worksheet:

Period: 01/23/2010 to 01/29/2010 - Days: 6
It is in general format. The day numbers will always be in the last, last
2
, or last 3 positions.
Depending on the period, the days may be any # up to the 365.
I need to use that day #, be it 6, or 25, or 147, whatever, as a divisor
of
another number. E.g. if 6, then 1234 / 6 = 206
if 25, then 5678 / 25 = 227, etc/
The variable #'s will be in the same cell, so I basically want: E29/6 or
E29/25, or E29/147, etc.
Basically, those general formatted #'s converted to a usable/divisable #.

Thanks,

Steve




.

  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Convert variable #'s in a gen. format to a # that can be used

E.g. Formula result is 6(in J3).... e19/j3 = #value!

What's in E19?

When a formula like that resturns a #VALUE! error it usually means one (or
possibly both) cells referenced contain TEXT. Since we know that J3 contains
numeric 6 then the problem has to be with cell E19.

--
Biff
Microsoft Excel MVP


"Steve" wrote in message
...
I do believe the "Days" will always be present, and your formula works to
produce either the single #, tens, or hundreds, but when I use that result
as
a divisor, it still produces a #value!
E.g. Formula result is 6(in J3).... e19/j3 = #value!

"T. Valko" wrote:

One way...

Assuming the word "Days:" is *always* present.

=--MID(A1,SEARCH("Days:",A1)+5,5)

--
Biff
Microsoft Excel MVP


"Steve" wrote in message
...
I have this data that is pasted to my worksheet:

Period: 01/23/2010 to 01/29/2010 - Days: 6
It is in general format. The day numbers will always be in the last,
last
2
, or last 3 positions.
Depending on the period, the days may be any # up to the 365.
I need to use that day #, be it 6, or 25, or 147, whatever, as a
divisor
of
another number. E.g. if 6, then 1234 / 6 = 206
if 25, then 5678 / 25 = 227, etc/
The variable #'s will be in the same cell, so I basically want: E29/6
or
E29/25, or E29/147, etc.
Basically, those general formatted #'s converted to a usable/divisable
#.

Thanks,

Steve




.



  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,814
Default Convert variable #'s in a gen. format to a # that can be used

E19 has a number in it. Formatted as a number.
Also, in playing around, I may have changed the formatting of J3. It is
currently formatted as a number.

Thanks,

Steve

"T. Valko" wrote:

E.g. Formula result is 6(in J3).... e19/j3 = #value!


What's in E19?

When a formula like that resturns a #VALUE! error it usually means one (or
possibly both) cells referenced contain TEXT. Since we know that J3 contains
numeric 6 then the problem has to be with cell E19.

--
Biff
Microsoft Excel MVP


"Steve" wrote in message
...
I do believe the "Days" will always be present, and your formula works to
produce either the single #, tens, or hundreds, but when I use that result
as
a divisor, it still produces a #value!
E.g. Formula result is 6(in J3).... e19/j3 = #value!

"T. Valko" wrote:

One way...

Assuming the word "Days:" is *always* present.

=--MID(A1,SEARCH("Days:",A1)+5,5)

--
Biff
Microsoft Excel MVP


"Steve" wrote in message
...
I have this data that is pasted to my worksheet:

Period: 01/23/2010 to 01/29/2010 - Days: 6
It is in general format. The day numbers will always be in the last,
last
2
, or last 3 positions.
Depending on the period, the days may be any # up to the 365.
I need to use that day #, be it 6, or 25, or 147, whatever, as a
divisor
of
another number. E.g. if 6, then 1234 / 6 = 206
if 25, then 5678 / 25 = 227, etc/
The variable #'s will be in the same cell, so I basically want: E29/6
or
E29/25, or E29/147, etc.
Basically, those general formatted #'s converted to a usable/divisable
#.

Thanks,

Steve




.



.



  #11   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Convert variable #'s in a gen. format to a # that can be used

If this string is in cell A1:

Period: 01/23/2010 to 01/29/2010 - Days: 6

What result do you get from this formula:

=CODE(RIGHT(A1))

That formula should return 54. That's the character code value for the
number 6. If you get a result other than 54 then that means there is some
unseen whitespace character(s) at the end of the string in cell A1.

--
Biff
Microsoft Excel MVP


"Steve" wrote in message
...
E19 has a number in it. Formatted as a number.
Also, in playing around, I may have changed the formatting of J3. It is
currently formatted as a number.

Thanks,

Steve

"T. Valko" wrote:

E.g. Formula result is 6(in J3).... e19/j3 = #value!


What's in E19?

When a formula like that resturns a #VALUE! error it usually means one
(or
possibly both) cells referenced contain TEXT. Since we know that J3
contains
numeric 6 then the problem has to be with cell E19.

--
Biff
Microsoft Excel MVP


"Steve" wrote in message
...
I do believe the "Days" will always be present, and your formula works
to
produce either the single #, tens, or hundreds, but when I use that
result
as
a divisor, it still produces a #value!
E.g. Formula result is 6(in J3).... e19/j3 = #value!

"T. Valko" wrote:

One way...

Assuming the word "Days:" is *always* present.

=--MID(A1,SEARCH("Days:",A1)+5,5)

--
Biff
Microsoft Excel MVP


"Steve" wrote in message
...
I have this data that is pasted to my worksheet:

Period: 01/23/2010 to 01/29/2010 - Days: 6
It is in general format. The day numbers will always be in the last,
last
2
, or last 3 positions.
Depending on the period, the days may be any # up to the 365.
I need to use that day #, be it 6, or 25, or 147, whatever, as a
divisor
of
another number. E.g. if 6, then 1234 / 6 = 206
if 25, then 5678 / 25 = 227, etc/
The variable #'s will be in the same cell, so I basically want:
E29/6
or
E29/25, or E29/147, etc.
Basically, those general formatted #'s converted to a
usable/divisable
#.

Thanks,

Steve




.



.



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
from date format convert to text format is wrong nooris Excel Discussion (Misc queries) 2 February 4th 10 03:41 PM
How to convert german format numbers to british format boysie Excel Discussion (Misc queries) 3 March 8th 08 06:27 PM
Convert European Date format to American Format Albert Excel Discussion (Misc queries) 3 August 21st 07 10:02 PM
Convert numbers from text format to number format merlin68 Excel Discussion (Misc queries) 7 June 20th 07 07:03 PM
How can I convert a date format to an ISO week format (in EXCEL)? ELI Excel Discussion (Misc queries) 2 July 6th 05 06:31 PM


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

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

About Us

"It's about Microsoft Excel"