Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Text manipulation

I'm downloading data from a database that gives me
quantity in this format.
S 100M
B 100M
S 350M
S 5M

S=sell B=buy

I need to change this data just to give me the dollar
value.

so i need the 1st example to just read -100,000,000 and
the 2nd example to be 100,000,000, and so forth.

are there any functions or vba code to assist me in this
dilema.

thank you

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Text manipulation

=IF(A1="S",-1,1)*IF(RIGHT(B1,1)="M",LEFT(B1,LEN(B1)-1)*10^6,IF(RIGHT(B1,K1)=
"K",LEFT(B1,LEN(B1)-1)*10^3,B1))

--
Regards,
Tom Ogilvy



"Ryan" wrote in message
...
I'm downloading data from a database that gives me
quantity in this format.
S 100M
B 100M
S 350M
S 5M

S=sell B=buy

I need to change this data just to give me the dollar
value.

so i need the 1st example to just read -100,000,000 and
the 2nd example to be 100,000,000, and so forth.

are there any functions or vba code to assist me in this
dilema.

thank you



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Text manipulation

In my previous example all the text is in one cell. so,

cell A1 contains:

S 100M

cell B1 contains:

B 100M

and so forth

need to covert those cells to just take the numbers and
covert into numeric value. 100M = 100,000,000; S=sell
(negative value); B=buy(positive value)

Tks.


-----Original Message-----
=IF(A1="S",-1,1)*IF(RIGHT(B1,1)="M",LEFT(B1,LEN(B1)-1)

*10^6,IF(RIGHT(B1,K1)=
"K",LEFT(B1,LEN(B1)-1)*10^3,B1))

--
Regards,
Tom Ogilvy



"Ryan" wrote in

message
...
I'm downloading data from a database that gives me
quantity in this format.
S 100M
B 100M
S 350M
S 5M

S=sell B=buy

I need to change this data just to give me the dollar
value.

so i need the 1st example to just read -100,000,000 and
the 2nd example to be 100,000,000, and so forth.

are there any functions or vba code to assist me in

this
dilema.

thank you



.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Text manipulation

Do text to columns from the data menu and separate the leading text and the
second text into separate columns.

--
Regards,
Tom Ogilvy

"Ryan" wrote in message
...
In my previous example all the text is in one cell. so,

cell A1 contains:

S 100M

cell B1 contains:

B 100M

and so forth

need to covert those cells to just take the numbers and
covert into numeric value. 100M = 100,000,000; S=sell
(negative value); B=buy(positive value)

Tks.


-----Original Message-----
=IF(A1="S",-1,1)*IF(RIGHT(B1,1)="M",LEFT(B1,LEN(B1)-1)

*10^6,IF(RIGHT(B1,K1)=
"K",LEFT(B1,LEN(B1)-1)*10^3,B1))

--
Regards,
Tom Ogilvy



"Ryan" wrote in

message
...
I'm downloading data from a database that gives me
quantity in this format.
S 100M
B 100M
S 350M
S 5M

S=sell B=buy

I need to change this data just to give me the dollar
value.

so i need the 1st example to just read -100,000,000 and
the 2nd example to be 100,000,000, and so forth.

are there any functions or vba code to assist me in

this
dilema.

thank you



.



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
Value manipulation Vic Excel Discussion (Misc queries) 3 April 3rd 09 03:18 PM
Text string manipulation... NWO Excel Worksheet Functions 4 August 3rd 07 03:31 AM
Text manipulation paulinoluciano Excel Worksheet Functions 5 April 18th 06 01:24 AM
Text manipulation paulinoluciano Excel Worksheet Functions 36 January 12th 06 09:54 AM
text manipulation eenstudent Excel Worksheet Functions 5 July 13th 05 10:23 PM


All times are GMT +1. The time now is 08:31 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"