PC Review


Reply
Thread Tools Rate Thread

Copy Cells Q

 
 
Seanie
Guest
Posts: n/a
 
      30th Oct 2008
How could I copy cells in a range but reverse its sign?

E.g To Copy Range A22 to A11
The value in A2= 15000
The value I wish then to see in A1 = -15000
Same for B22 etc
There maybe <blanks> in cells A22 if so I would still want these
blank in A11

Thanks

 
Reply With Quote
 
 
 
 
JE McGimpsey
Guest
Posts: n/a
 
      30th Oct 2008
Are A11 blank? If so, one way:

Copy A22. Select A11. Choose Edit/Paste Special, selecting the
Subtract radio button.


In article
<6bca330c-7225-45af-8b11-(E-Mail Removed)>,
Seanie <(E-Mail Removed)> wrote:

> How could I copy cells in a range but reverse its sign?
>
> E.g To Copy Range A22 to A11
> The value in A2= 15000
> The value I wish then to see in A1 = -15000
> Same for B22 etc
> There maybe <blanks> in cells A22 if so I would still want these
> blank in A11
>
> Thanks

 
Reply With Quote
 
Mike H
Guest
Posts: n/a
 
      30th Oct 2008
Hi,

Put this in a1 and drag right to d1

=IF(A2<>"",-A2,"")

Mike

"Seanie" wrote:

> How could I copy cells in a range but reverse its sign?
>
> E.g To Copy Range A22 to A11
> The value in A2= 15000
> The value I wish then to see in A1 = -15000
> Same for B22 etc
> There maybe <blanks> in cells A22 if so I would still want these
> blank in A11
>
> Thanks
>
>

 
Reply With Quote
 
Seanie
Guest
Posts: n/a
 
      30th Oct 2008
Thanks guys, what I should have included is that I wanted to do this
via code, so from your suggestions, I recorded below

Sub CopyPreviousEvents()
Application.ScreenUpdating = False
Range("C59:AE60").Select
Range("C60").Activate
Selection.ClearContents
Range("C61:AE61").Select
Selection.Copy
Range("C60").Select
Selection.PasteSpecial Paste:=xlPasteValues,
Operation:=xlSubtract, _
SkipBlanks:=False, Transpose:=False
Range("C61:AE61").Select
Application.CutCopyMode = False
Selection.ClearContents
Range("C6").Select
End Sub

 
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 an intial cells contents into the next series of blank cells ina column freeriderxlt Microsoft Excel Discussion 2 25th Aug 2009 07:47 AM
RE: Copy Visible Cells in Sheet with Merged and Hidden Cells FSt1 Microsoft Excel Misc 1 2nd Oct 2008 12:51 AM
macro needed to copy blocks of cells across to list of cells down =?Utf-8?B?cGllcnNvbnBybw==?= Microsoft Excel Programming 3 28th Mar 2007 12:51 PM
How to use macros to copy a range of cells which can exclude some cells which I didn't want to be copied? excelnovice Microsoft Excel Worksheet Functions 2 25th Sep 2005 12:38 AM
How to COPY from cells to cells w/o affecting respective formulae underneath ? EduardoDon Microsoft Excel New Users 1 21st Apr 2004 12:12 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:19 AM.