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:)
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Hi,

I think what you are after is this.... (I have reposted your example) .... if you type Paid into column C, it moves the value from column B to column A. Is that right?

<table border = "1" cellspacing = "0" bordercolor="#999999">
<tr><td bgcolor="#C0C0C0"> </td>
<td align="center" bgcolor="#C0C0C0"><b>A</b></td><td align="center" bgcolor="#C0C0C0"><b>B</b></td><td align="center" bgcolor="#C0C0C0"><b>C</b></td></tr>
<tr><td align = "center" bgcolor="#C0C0C0"><b>1</b></td><td rowspan="1" colspan="1" width="192" height="30" align = "left" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">Before </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000"> </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000"> </font></td></tr>
<tr><td align = "center" bgcolor="#C0C0C0"><b>2</b></td><td rowspan="1" colspan="1" width="192" height="30" align = "left" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">PAID </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "left" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">UNPAID </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "left" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">REMARKS* </font></td></tr>
<tr><td align = "center" bgcolor="#C0C0C0"><b>3</b></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000"> </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">100 </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "left" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">NOT* </font></td></tr>
<tr><td align = "center" bgcolor="#C0C0C0"><b>4</b></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000"> </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000"> </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000"> </font></td></tr>
<tr><td align = "center" bgcolor="#C0C0C0"><b>5</b></td><td rowspan="1" colspan="1" width="192" height="30" align = "left" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">After </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000"> </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000"> </font></td></tr>
<tr><td align = "center" bgcolor="#C0C0C0"><b>6</b></td><td rowspan="1" colspan="1" width="192" height="30" align = "left" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">PAID </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "left" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">UNPAID </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "left" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">REMARKS* </font></td></tr>
<tr><td align = "center" bgcolor="#C0C0C0"><b>7</b></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">100 </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000"> </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "left" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">Paid </font></td></tr>
</table>
 
Upvote 0
Hi,

I think what you are after is this.... (I have reposted your example) .... if you type Paid into column C, it moves the value from column B to column A. Is that right?











ABC
1Before
2PAID UNPAID REMARKS*
3 100 NOT*
4
5After
6PAID UNPAID REMARKS*
7100 Paid

<tbody>
</tbody>


Hi! Yes, that's what i mean.. :) thanks
 
Upvote 0
This will do that for you.

Code:
Sub Marine()

Dim C As Range

    For Each C In Range("c2:c" & Range("c" & Rows.Count).End(xlUp).Row)
    
        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

End Sub
 
Upvote 0
"hi again.. unfortunately It doesn't work in my excel 2007, is there a way wherein I don't need to use macro? Thanks a lot.

-Elaine :)
 
Upvote 0
Not that I know of without using macro... I have just noticed that you use "PAID" rather than "Paid"... maybe try changing it to

Code:
 If C.Value = "PAID" Then
 
Upvote 0
Hi! Now it works.. Thanks a lot! :) Btw, Can I also use this code if I have tons of entries? You really are a big help. :D Thank you very much..
 
Upvote 0
You are most welcome, you can use it for as many rows as you have... but the more rows you have the longer it will take. How many entries are the likely to be? If its a lot I can do things to speed it up.
 
Upvote 0
You are most welcome, you can use it for as many rows as you have... but the more rows you have the longer it will take. How many entries are the likely to be? If its a lot I can do things to speed it up.

"sorry for the late reply, most probably 600 entries.:)
 
Upvote 0
No problem, 600 rows will be pretty quick. I ran it on 1500 rows at it took 0.67 seconds. It does assume there are no gaps in column C ... ie every row has a value.... is that correct?
 
Upvote 0

Forum statistics

Threads
1,213,491
Messages
6,113,963
Members
448,536
Latest member
CantExcel123

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