Copying/ Transferring Data from cell to cell

elaine6985

New Member
Joined
Sep 27, 2013
Messages
12
Good Day!

I would like to ask if it is possible to transfer data from cell to another cell?
See sample below:

BEFORE:

A B C
1 PAID UNPAID REMARKS

2 100 NOT

AFTER:

A B C
1 PAID UNPAID REMARKS

2 100 PAID

*What i mean is that the data in UNPAID will be transferred to PAID once the remarks is Paid.
Thank you very much in advance...

-Elaine:)
 
try this!!! =sumif(c1:c7"=",B1:B7) IN THIS IF YOU GIVE THE AMOUNT IN ANY ROW OF B IT WILL REFLECT IN C ALSO !!!!!
 
Upvote 0

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
needs a slight change otherwise it might miss the last few rows.... just use this one (max 5000 rows including spaces but you can increase if you want to.)

Code:
Sub Marine()
Application.ScreenUpdating = False
Dim C As Range

    For Each C In Range("c2:c5000")
    
        If C.Value = "Paid" Then
        
            C.Offset(0, -2).Value = C.Offset(0, -1).Value
            C.Offset(0, -1).Value = 0
            
        End If
        
        
    
    Next C
Application.ScreenUpdating = True
End Sub
 
Upvote 0
I would like to ask something.. Do I need to paste this code to the module and sheet 1? and also I want to ask do i need to run it always? Is there other way that I don't need to run it?
 
Upvote 0
no, just into a module... and I can change it so it runs every time you make a change to the data if you like?

Or you can assign a short cut key to run it for you... using this.

On the Tools menu, point to Macro, and then click Macros.
In the Macro name box, enter the name of the macro you want to assign to a keyboard shortcut key.
Click Options.
If you want to run the macro by pressing a keyboard shortcut key, enter a letter in the Shortcut key box. You can use CTRL+ letter (for lowercase letters) or CTRL+SHIFT+ letter (for uppercase letters), where letter is any letter key on the keyboard. The shortcut key cannot use a number or special character, such as @ or #.

Note: The shortcut key will override any equivalent default Microsoft Excel shortcut keys while the workbook that contains the macro is open.

If you want to include a description of the macro, type it in the Description box.

Click OK.
Click Cancel.
 
Last edited:
Upvote 0
Im just about to run out of the door, but this should do it. This one has to go into the Sheet code, NOT the module code. Every time you change a value... it will on that cell.

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
      If Target.Value = "Paid" Then
        
            Target.Offset(0, -2).Value = Target.Offset(0, -1).Value
            Target.Offset(0, -1).Value = 0
            
        End If
End Sub
 
Upvote 0

Forum statistics

Threads
1,215,472
Messages
6,125,004
Members
449,203
Latest member
Daymo66

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top