PC Review


Reply
Thread Tools Rate Thread

Copy only basic number without dollar sign or commas (or cell formatting)?

 
 
StargateFanFromWork
Guest
Posts: n/a
 
      13th Sep 2007
Would there be a way to have XL2K allow user to copy a cell's result but
paste it without dollar sign and comma?

What I mean is that cell K2 shows result of, say, $5,496.64 with formula of
=SUM(J3:J65506)

Is there a way to get it to make paste show up as the basic number, also
without any of the cell formatting, so that result is

5496.64

instead of $5,496.64?


Thanks! D


 
Reply With Quote
 
 
 
 
=?Utf-8?B?Sk5X?=
Guest
Posts: n/a
 
      13th Sep 2007
Copy then pastespecial with just values.
--
JNW


"StargateFanFromWork" wrote:

> Would there be a way to have XL2K allow user to copy a cell's result but
> paste it without dollar sign and comma?
>
> What I mean is that cell K2 shows result of, say, $5,496.64 with formula of
> =SUM(J3:J65506)
>
> Is there a way to get it to make paste show up as the basic number, also
> without any of the cell formatting, so that result is
>
> 5496.64
>
> instead of $5,496.64?
>
>
> Thanks! D
>
>
>

 
Reply With Quote
 
=?Utf-8?B?VG9tIE9naWx2eQ==?=
Guest
Posts: n/a
 
      13th Sep 2007
Edit=>Paste special and select values.

--
Regards,
Tom Ogilvy


"StargateFanFromWork" wrote:

> Would there be a way to have XL2K allow user to copy a cell's result but
> paste it without dollar sign and comma?
>
> What I mean is that cell K2 shows result of, say, $5,496.64 with formula of
> =SUM(J3:J65506)
>
> Is there a way to get it to make paste show up as the basic number, also
> without any of the cell formatting, so that result is
>
> 5496.64
>
> instead of $5,496.64?
>
>
> Thanks! D
>
>
>

 
Reply With Quote
 
StargateFanFromWork
Guest
Posts: n/a
 
      14th Sep 2007
"Tom Ogilvy" <(E-Mail Removed)> wrote in message
news:CB2DE251-F8B3-4544-B857-(E-Mail Removed)...
> Edit=>Paste special and select values.


I'm sorry. I wasn't clear. I need a vb solution which is why I posted to
this ng <g>, and the app I'm copying into doesn't have paste special. Sorry
'bout that.

So I'd need the vb code to hopefully copy and remove the $ and , from the
value so that when I paste to another application, I get just the basic
number.
i.e., in my example below, I'd take the result of the formula
=SUM(J3:J65506) of, say,

$15,278.34

and get a paste of

15278.34

The application I'm pasting into is a custom-built one where I work and it
doesn't accept the $ sign and comma in numbers like $15,278.34. It would
save me time to have something like this, so here's hoping! <g>

Thanks! D

> --
> Regards,
> Tom Ogilvy
>
>
> "StargateFanFromWork" wrote:
>
>> Would there be a way to have XL2K allow user to copy a cell's result but
>> paste it without dollar sign and comma?
>>
>> What I mean is that cell K2 shows result of, say, $5,496.64 with formula
>> of
>> =SUM(J3:J65506)
>>
>> Is there a way to get it to make paste show up as the basic number, also
>> without any of the cell formatting, so that result is
>>
>> 5496.64
>>
>> instead of $5,496.64?
>>
>>
>> Thanks! D
>>
>>
>>



 
Reply With Quote
 
StargateFanFromWork
Guest
Posts: n/a
 
      14th Sep 2007
Does the lack of answer mean this is not possible?

Cheers. D


"StargateFanFromWork" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> "Tom Ogilvy" <(E-Mail Removed)> wrote in message
> news:CB2DE251-F8B3-4544-B857-(E-Mail Removed)...
>> Edit=>Paste special and select values.

>
> I'm sorry. I wasn't clear. I need a vb solution which is why I posted to
> this ng <g>, and the app I'm copying into doesn't have paste special.
> Sorry 'bout that.
>
> So I'd need the vb code to hopefully copy and remove the $ and , from the
> value so that when I paste to another application, I get just the basic
> number.
> i.e., in my example below, I'd take the result of the formula
> =SUM(J3:J65506) of, say,
>
> $15,278.34
>
> and get a paste of
>
> 15278.34
>
> The application I'm pasting into is a custom-built one where I work and it
> doesn't accept the $ sign and comma in numbers like $15,278.34. It would
> save me time to have something like this, so here's hoping! <g>
>
> Thanks! D
>
>> --
>> Regards,
>> Tom Ogilvy
>>
>>
>> "StargateFanFromWork" wrote:
>>
>>> Would there be a way to have XL2K allow user to copy a cell's result but
>>> paste it without dollar sign and comma?
>>>
>>> What I mean is that cell K2 shows result of, say, $5,496.64 with formula
>>> of
>>> =SUM(J3:J65506)
>>>
>>> Is there a way to get it to make paste show up as the basic number, also
>>> without any of the cell formatting, so that result is
>>>
>>> 5496.64
>>>
>>> instead of $5,496.64?
>>>
>>>
>>> Thanks! D
>>>
>>>
>>>

>
>



 
Reply With Quote
 
StargateFanFromWork
Guest
Posts: n/a
 
      18th Sep 2007
"StargateFanFromWork" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Does the lack of answer mean this is not possible?
>
> Cheers. D


Again, thanks for the responses so far, but I'm working out of XL2K and into
another application. The amount in the formula comes from XL2K but I need
it to copy the amount without the $ and , so that when I go into the other
application, I get the desired results.

Perhaps behind-the-scenes, XL2K can copy the cell and paste it virtually
somewhere, strip the $ and , and then copy that to the clipboard?? Then I
could just paste straight from the clipboard in the desired format. Again,
I haven't a clue how to do this, but perhaps someone here might know a
possible workaround??

Any suggestions welcome on how to do this.

Thanks. D

> "StargateFanFromWork" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
>> "Tom Ogilvy" <(E-Mail Removed)> wrote in message
>> news:CB2DE251-F8B3-4544-B857-(E-Mail Removed)...
>>> Edit=>Paste special and select values.

>>
>> I'm sorry. I wasn't clear. I need a vb solution which is why I posted
>> to this ng <g>, and the app I'm copying into doesn't have paste special.
>> Sorry 'bout that.
>>
>> So I'd need the vb code to hopefully copy and remove the $ and , from the
>> value so that when I paste to another application, I get just the basic
>> number.
>> i.e., in my example below, I'd take the result of the formula
>> =SUM(J3:J65506) of, say,
>>
>> $15,278.34
>>
>> and get a paste of
>>
>> 15278.34
>>
>> The application I'm pasting into is a custom-built one where I work and
>> it doesn't accept the $ sign and comma in numbers like $15,278.34. It
>> would save me time to have something like this, so here's hoping! <g>
>>
>> Thanks! D
>>
>>> --
>>> Regards,
>>> Tom Ogilvy
>>>
>>>
>>> "StargateFanFromWork" wrote:
>>>
>>>> Would there be a way to have XL2K allow user to copy a cell's result
>>>> but
>>>> paste it without dollar sign and comma?
>>>>
>>>> What I mean is that cell K2 shows result of, say, $5,496.64 with
>>>> formula of
>>>> =SUM(J3:J65506)
>>>>
>>>> Is there a way to get it to make paste show up as the basic number,
>>>> also
>>>> without any of the cell formatting, so that result is
>>>>
>>>> 5496.64
>>>>
>>>> instead of $5,496.64?
>>>>
>>>>
>>>> Thanks! D
>>>>
>>>>
>>>>

>>
>>

>
>



 
Reply With Quote
 
JE McGimpsey
Guest
Posts: n/a
 
      18th Sep 2007
One possible solution:

Public Sub CopyUnformatted()
Dim vArr As Variant
Dim i As Long
Application.ScreenUpdating = False
With Selection
ReDim vArr(1 To .Count)
For i = 1 To .Count
vArr(i) = .Cells(i).NumberFormat
Next i
.NumberFormat = "General"
.Copy
For i = 1 To .Count
.Cells(i).NumberFormat = vArr(i)
Next i
End With
Application.ScreenUpdating = True
End Sub


In article <eh$GUPg#(E-Mail Removed)>,
"StargateFanFromWork" <(E-Mail Removed)> wrote:

> Perhaps behind-the-scenes, XL2K can copy the cell and paste it virtually
> somewhere, strip the $ and , and then copy that to the clipboard?? Then I
> could just paste straight from the clipboard in the desired format. Again,
> I haven't a clue how to do this, but perhaps someone here might know a
> possible workaround??

 
Reply With Quote
 
StargateFanFromWork
Guest
Posts: n/a
 
      18th Sep 2007
"JE McGimpsey" <(E-Mail Removed)> wrote in message
news:jemcgimpsey-(E-Mail Removed)...
> One possible solution:
>
> Public Sub CopyUnformatted()
> Dim vArr As Variant
> Dim i As Long
> Application.ScreenUpdating = False
> With Selection
> ReDim vArr(1 To .Count)
> For i = 1 To .Count
> vArr(i) = .Cells(i).NumberFormat
> Next i
> .NumberFormat = "General"
> .Copy
> For i = 1 To .Count
> .Cells(i).NumberFormat = vArr(i)
> Next i
> End With
> Application.ScreenUpdating = True
> End Sub


Hi, thanks!

What does this copy from, pls? Since I didn't see a reference, I assumged
it would work with the selected cell.

When I used H15 as a test, which contains the value $26,549.46, I get a zero
value in both G16 and H16 (formatted as 0 and $0.00, respectively due to
formatting) and did not end up with 26549.46. The fact that the 2 cells get
zero in them is weird as they're not linked via a formula in any way. Also,
after the values get dumped into the cells, there is nothing left in the
clipboard to go to the other program to paste the info from Excel so that
part is missing. so the $26,549.46 disappears with this macro <g>.

What am I doing wrong, pls?

Cheers. D

> In article <eh$GUPg#(E-Mail Removed)>,
> "StargateFanFromWork" <(E-Mail Removed)> wrote:
>
>> Perhaps behind-the-scenes, XL2K can copy the cell and paste it virtually
>> somewhere, strip the $ and , and then copy that to the clipboard?? Then
>> I
>> could just paste straight from the clipboard in the desired format.
>> Again,
>> I haven't a clue how to do this, but perhaps someone here might know a
>> possible workaround??



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Count the number of Commas found in cell A2 B~O~B Microsoft Excel Worksheet Functions 3 2nd Apr 2008 05:27 PM
how can i change dollar sign to rupee sign in sales invoice =?Utf-8?B?dmlzaGFsIGtvaGxp?= Microsoft Excel Misc 3 10th May 2007 02:06 PM
Dollar sign on left side of cell kurtis Microsoft Excel New Users 1 2nd Oct 2005 05:18 AM
Sort data and leave one specific cell with $ dollar sign formatting mary Microsoft Excel Discussion 4 1st Aug 2005 02:39 AM
How do I align numbers where one number has a dollar sign? =?Utf-8?B?Q2FydGVyIERldmVyZWF1eA==?= Microsoft Excel Charting 1 26th Jun 2005 07:20 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:31 AM.