PC Review


Reply
Thread Tools Rate Thread

Copy/Paste cells containing only numbers with .50 in it

 
 
HunterX
Guest
Posts: n/a
 
      2nd Jun 2010
I have been trying to come up with a formula that will read each cell in a
column and copy & paste only the cells that contain numbers with .50. I can
seem to properly configure the formula to read any whole number as long as it
contains .50 in it. I want these vnumbers pasted into a seperate column.

=IF(D21="*"+"0.50"),(D21),("")

Thank you very much for your assistance.



 
Reply With Quote
 
 
 
 
Gord Dibben
Guest
Posts: n/a
 
      2nd Jun 2010
=IF(D21-INT(D21)=0.5,D21,"")

If you truly want the numbers copied and pasted you would have to use VBA.


Gord Dibben MS Excel MVP

On Wed, 2 Jun 2010 07:39:01 -0700, HunterX
<(E-Mail Removed)> wrote:

>I have been trying to come up with a formula that will read each cell ina
>column and copy & paste only the cells that contain numbers with .50. I can
>seem to properly configure the formula to read any whole number as long as it
>contains .50 in it. I want these vnumbers pasted into a seperate column.
>
>=IF(D21="*"+"0.50"),(D21),("")
>
>Thank you very much for your assistance.
>
>


 
Reply With Quote
 
Gary''s Student
Guest
Posts: n/a
 
      2nd Jun 2010
Install this event macro in the worksheet code area:

Private Sub Worksheet_Change(ByVal Target As Range)
Set A1 = Range("A1")
Set B1 = Range("B1")
Set C1 = Range("C1")
If Intersect(Target, A1) Is Nothing Then Exit Sub
If Not IsEmpty(B1) Then Exit Sub
If Not IsEmpty(C1) Then Exit Sub
Application.EnableEvents = False
A1.Clear
Application.EnableEvents = True
End Sub


Because it is worksheet code, it is very easy to install and use:

1. right-click the tab name near the bottom of the window
2. select View Code - this brings up a VBE window
3. paste the stuff in and close the VBE window

If you save the workbook, the macro will be saved with it.

To remove the macro:

1. bring up the VBE windows as above
2. clear the code out
3. close the VBE window

To learn more about macros in general, see:

http://www.mvps.org/dmcritchie/excel/getstarted.htm

To learn more about Event Macros (worksheet code), see:

http://www.mvps.org/dmcritchie/excel/event.htm


--
Gary''s Student - gsnu201003


"HunterX" wrote:

> I have been trying to come up with a formula that will read each cell in a
> column and copy & paste only the cells that contain numbers with .50. I can
> seem to properly configure the formula to read any whole number as long as it
> contains .50 in it. I want these vnumbers pasted into a seperate column.
>
> =IF(D21="*"+"0.50"),(D21),("")
>
> Thank you very much for your assistance.
>
>
>

 
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
Copy and paste versus copy and insert copied cells =?Utf-8?B?QWxhbmE=?= Microsoft Excel New Users 1 28th Sep 2007 08:58 PM
Copy/Paste how to avoid the copy of formula cells w/o calc values =?Utf-8?B?RGVubmlz?= Microsoft Excel Misc 10 2nd Mar 2006 10:47 PM
how can we copy cells comments text and paste to cells =?Utf-8?B?16nXmSDXpNec15M=?= Microsoft Excel Misc 2 10th Dec 2005 03:22 PM
Re: Copy/Paste in Excel prints highlighted cells and does not paste Debra Dalgleish Microsoft Excel Misc 0 30th Jul 2003 11:59 PM
Re: Copy/Paste in Excel prints highlighted cells and does not paste Dave Peterson Microsoft Excel Misc 0 30th Jul 2003 11:08 PM


Features
 

Advertising
 

Newsgroups
 


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