Free Microsoft Excel 2013 Quick Reference

Mirror data of one cell to another

Hi i am looking to miror the data of one cell (cellA) to another Cell (cellB)
Cell A I need to add the data to and for it to automaticaly appeares in cell B
I can not have any formulars in cell B because it is controlled by a macro button and deleates the formulars
I hope i have explaind it properly thanks Ron


Post your answer or comment

comments powered by Disqus
Having issues with figuring out how to automate this process using variables or the like. I know I can phsycially just go thru and make up a redundant list of like 30 or so commands to complete the task im trying to do, but it would seem that i should be able to just make variables in order to do what im needing. I'll post this code here:

	VB:
	
 Macro5() 
     '
     ' Macro5 Macro
     ' Macro recorded 11/11/2004 by Terron Carroll
     '
     ' Keyboard Shortcut: Option+Cmd+u
     '
    Range("C1").Select 
    Range("C1").Cut Destination:=Range("B1") 
    Range("C2").Select 
    Selection.Cut Destination:=Range("C1") 
    Range("C3").Select 
    Range("C3").Cut Destination:=Range("D1") 
    Range("A2:F3").Select 
    Selection.Delete Shift:=xlUp 
    Range("C2").Select 
    Range("C2").Cut Destination:=Range("B2") 
    Range("C3").Select 
    Selection.Cut Destination:=Range("C2") 
    Range("C4").Select 
    Range("C4").Cut Destination:=Range("D2") 
    Range("A3:F4").Select 
    Selection.Delete Shift:=xlUp 
    Range("C3").Select 
    Range("C3").Cut Destination:=Range("B3") 
    Range("C4").Select 
    Selection.Cut Destination:=Range("C3") 
    Range("C5").Select 
    Range("C5").Cut Destination:=Range("D3") 
    Range("A4:F5").Select 
    Selection.Delete Shift:=xlUp 
    Range("C4").Select 
    Range("C4").Cut Destination:=Range("B4") 
    Range("C5").Select 
    Selection.Cut Destination:=Range("C4") 
    Range("C6").Select 
    Range("C6").Cut Destination:=Range("D4") 
    Range("A5:F6").Select 
    Selection.Delete Shift:=xlUp 
End Sub 

If you like these VB formatting tags please consider sponsoring the author in support of injured Royal Marines
if you see what i'm trying to do it's basically move data from one cell, to another to another to all go on one line, then delete the two lines that it was input on. (long story why it's like that but it's irrelevant) Could someone shed some light on this possibly on how I could have it automate this task and just loop until it comes upon completely empty rows then just stops? Any information would be needed or if it's not do-able, that's fine too i'll just make up a list to do what i had said, like 30-40 some odd lines to have it do it on.

T.c.

One of my excel spreadsheets has started automatically copying data from one
cell to another (or rather ROWS of data) without displaying any formula or
explanation for the information. It seems to insert it about 10 - 20 rows
apart, just one cell, and slips it in before one can notice it happening...
Can anyone suggest anything?

Is there a formula that will return only partial data from one cell to another?
Ex. Cell D1 contains (5^Inlet) And I want to write a formula that will only
return the number 5 of cell D1 to Cell A1. Is this possible?

Is there a function which sends the cell contents of one cell to another?

For example... A1 has "Hello" in it.

In cell A2 I need a function to send "Hello" to cell A3 .... does such a function exist?

I need to know how to copy the contents of one cell to another cell based on
a match in two other cells. Something like this:

A B C D
1 TH125 1.25 YG452
2 YG452 3.65 KE956
3 UH555 2.30 AM522
4 KE956 6.33 GH522

What I need to do is match the contents in columns A and C and if they match
insert the value for B into D

As you can tell the contents in column A do are also in C but not in the
same order, there is nothing in D which are the cells I need to polulate from
B. Also, A has 12000 rows where C may only have 3000. If there is not match
then D should remain blank or 0

When completed it should look like this:

A B C D
1 TH125 1.25 YG452 3.65
2 YG452 3.65 KE956 6.33
3 UH555 2.30 AM522
4 KE956 6.33 GH522

Is this possible, Seems I did it many years ago in Excel 2003 but cannot
remember how.

Thanks a bunch

Is there a command that automatically sends data from one
cell to another cell once the first cell contains data. I
know that the usual way to do this is to use the copy
command: =Sheet1$X53 however this is 'pulling the data'
rather than having it be sent to another cell. However I
don't want to use this formula as I require that the
worksheet that the data is sent to has all unused cells
blank (as opposed to having unused cells containing the
copy command). The reason for this requirement is that the
worksheet needs to be imported into a system that rejects
blank cells with formula's in. (usually we have to delete
each unused cell).

I hope this makes senses - And I'd be extremly thankful
for any help!

Charlie

Is there a way to swap data from one cell to another?

What I need is a way to swap the data from say E12 to F12 and also swap F12
to E12 at the same time.

Don't know if this is possible, but any help wold be appreciated.

--
Brooks W.

I have Owner1, Owner2, Owner3, OwnerAddress

I want to query Owner3 and IF null (blank), move value of Owner2 to
OwnerAddress.

Is this enough info to give me a push in the right direction? I
understand functions can't move data? So I need to use some code
like:

Sub MyMacro1()
'
' MyMacro1 Macro
'

'
Range("I3").Select
Selection.Cut
Range("K3").Select
ActiveSheet.Paste
End Sub

Can someone help with a routine to look for null and if so execute
some code to move (cut and paste) values from one cell to another?

Hi all.

It is the first time I have posetd in here and am very interested in
learning more about VB for Excel.
Firstly, anyone know the best way to start learning? Are there any
books you could recommend? or websites even?

Secondly, I am wondering how to do the following,

I need a macro to move data from one cell to a cell two to the right,
but rather than copy and pasting over the top of the cell the data from
the cell on the left gets added onto the end of the destination cell

For example

[red][][book] >>>>>>>> [ ][][red book]

I am looking for it to work with over areas of cells or just single
cells?

Is it possible?
I don't really know where to start.

Any help appreciated

Anthony

Let's say I need to copy some data in one cell to another cell in Excel but exclude some information. For example, the original cells have the following:

http://www.shamanshop.com/cgi-bin/shop/ASP-DEO-ADD.html
http://www.shamanshop.com/cgi-bin/shop/ASP-DEO-ADE.html

I just need to copy the "ASP-DEO-ADD" portion but not the url and not the .html portion.

How do I do it? Thanks in advance.

Hi ,
Anyone can tell me the Vb code in Excel for copying the data from onc cell to another cell without changing the format..

When i use like
cells(2,2) = cells(1,1)

It's copied the value but not the exact format ..

Thanks in advance

I am a new member and This is my first post WHO-HOO!!! had to get that out of the way. Now back to business I am fairly new to excel. I am trying to develop a macro that will grab data from one sheet and paste it to another sheet by clicking the entry in a combo box. I was partially successful with actualy getting the data from one sheet to another by developing a macro for each field and linking the field name to a field in the combo box. However, I want the macro to neatly place the data side by side.

Im not really Familiar with loops and If then else statements. But here is my thought process.
My thought process is
1)have a cell to put the first data in
2)check to see if any data is in the first row
3)check the next 9 rows to see if any data is in it
3a)If not then Paste the copied contents
3b) if it is then go to the first row of the next column and repeat step 3

Here is the code for the entries
Every time i try and run it i get a compile error
I think its because of my loops but im not sure

Sheets("Sheet1").Select
        Range("b2:b12").Select
    
    ActiveSheet.Range("b2:b12").Copy
Sheets("Sheet2").Select
'My thoughht Process #1
ActiveSheet.Range("a1").Select
            
    ActiveCell.Offset(0, 1).Select
'My thought process #2
   Do While IsEmpty(ActiveCell.Offset(0, 1)) = False
   ActiveCell.Offset(0, 1).Select
   Loop Until IsEmpty(ActiveCell)

   Do
'My thought Process #3
Do While IsEmpty(ActiveCell) = False
 If IsEmpty(ActiveCell) Then
  ActiveCell.Offset(1, 0).Select
   ElseIf IsEmpty(ActiveCell) = False Then
'My thought Process 3b
    ActiveCell.Offset(-1, 1).Select
     End If
     Loop
Do While IsEmpty(ActiveCell) = False
 If IsEmpty(ActiveCell) Then
  ActiveCell.Offset(1, 0).Select
   ElseIf IsEmpty(ActiveCell) = False Then
'My thought Process 3b
    ActiveCell.Offset(-2, 1).Select
     End If
      Loop
Do While IsEmpty(ActiveCell) = False
 If IsEmpty(ActiveCell) Then
  ActiveCell.Offset(1, 0).Select
   ElseIf IsEmpty(ActiveCell) = False Then
'My thought Process 3b
    ActiveCell.Offset(-3, 1).Select
     End If
      Loop
Do While IsEmpty(ActiveCell) = False
 If IsEmpty(ActiveCell) Then
  ActiveCell.Offset(1, 0).Select
   ElseIf IsEmpty(ActiveCell) = False Then
'My thought Process 3b
    ActiveCell.Offset(-4, 1).Select
     End If
      Loop
Do While IsEmpty(ActiveCell) = False
 If IsEmpty(ActiveCell) Then
  ActiveCell.Offset(1, 0).Select
   ElseIf IsEmpty(ActiveCell) = False Then
'My thought Process 3b
    ActiveCell.Offset(-5, 1).Select
     End If
      Loop
Do While IsEmpty(ActiveCell) = False
 If IsEmpty(ActiveCell) Then
  ActiveCell.Offset(1, 0).Select
   ElseIf IsEmpty(ActiveCell) = False Then
'My thought Process 3b
    ActiveCell.Offset(-6, 1).Select
     End If
      Loop
Do While IsEmpty(ActiveCell) = False
 If IsEmpty(ActiveCell) Then
  ActiveCell.Offset(1, 0).Select
   ElseIf IsEmpty(ActiveCell) = False Then
'My thought Process 3b
    ActiveCell.Offset(-7, 1).Select
     End If
      Loop
Do While IsEmpty(ActiveCell) = False
 If IsEmpty(ActiveCell) Then
  ActiveCell.Offset(1, 0).Select
   ElseIf IsEmpty(ActiveCell) = False Then
  'My thought Process 3b
    ActiveCell.Offset(-8, 1).Select
     End If
      Loop
Do While IsEmpty(ActiveCell) = False
 If IsEmpty(ActiveCell) Then
  ActiveCell.Offset(-8, 0).Select
 'My thoguht Process #3a
   ActiveSheet.Paste Destination:=ActiveCell
    ElseIf IsEmpty(ActiveCell) = False Then
  'My thought Process 3b
     ActiveCell.Offset(-9, 1).Select
      End If
       Loop
           
End Sub

I uploaded the document because I know I probly did not do a good job explaining it. I labeled every thing in the comments as well

I need help...... when ever i get an error code it makes me sad
and I dont like to be sad. Thanks in advance for any help.

Johnnieboi

Hello All,

I would like to have a macro to populate matching data from one file to another file. Here is the info:

The name of the files that I will be working are "IQR" & "ILR". Here are what needs to be done:

1. Find the data of file "ILR" of column "E" to file "IQR" of column "F" that matches.
2. If match found, populate data from file "ILR" of column "H" to file "IQR" of column "V" of the correct cell address.

I would appreciate your help on this.

Thank you in advance.

RNF

subject: Trying to go carry data from one sheet to another and have the formula rows increment

Hi,

A bit of background, I am helping the local rescue animal charity to create a an excel workbook instead of having everything on scattered pieces of paper. I am volunteering my time, and I can do simply things with excel, but I get confused when I have to use a mix of functions.

What I've done so far, as they have requested. They have been running for three years now and I am going to enter the data for the first year.

1. I have a sheet in a workbook that has 249 rows, the number of donations they received that year. Row 250 will add the total. Simple I can do.

2. The next sheet, will be for Jan, next sheet for Feb, and then more sheets for every month of the year. They are supposed to - on the directions of a volunteer accountant - create a summary sheet with all the details from the first running details sheet that can be printed off for each month of the year.

What I am trying to do:

- The first sheet is completed.

- On the second sheet - for Jan (I figured once this one is set up, I would copy it for the rest of the months)

I am trying to enter in a formula that calls the cells for:
a. The date
b. Who donated - including mailing addy
c. amount donated
d. receipt requested for income tax purposes

I can do this manually which would take forever, or I can come up with a formula that when I put it in the row for each column heading on the second sheet, I can just drag the formula down and all the data entered into the first sheet will auto be sorted to the right spot on that month sheet.

I think I would need to use the indirect and address function but I am a one function person, more then one and I get confused.

I would appreciate any help, anyone can give me.

Thanks in Advanced!

Julia

Is there a macro I can create in order to copy or move data from one
spreadsheet to another?

We have data sheets showing our reps achievements. The data sheet has been
updated with new objectives and calculations. Some of the cells are locked
and protected. The locked cells are where they cannot be selected, so there
are blocks of cells only that require copying to the new data sheets.

Is there a way to automate this so we don't have to copy and paste the
information manually?

Any help will be greatly appreciated!

Thanks,
Cheri

I believe that there is a way to bring part of the data
from one cell into another, but I sure can't find the
correct function to make this happen. For example:

"year 2005" is contained within cell A1 and I would like
to bring only "2005" into cell B3.

Does anyone know the formula to make this happen?

Thanks!
JT

Hi,

I want to be able to automatically copy data from one sheet to another sheet
on the last day of the month (the sheets are in the same workbook) when the
user opens or saves it (either way would be fine)

On sheet 1 there is a running total say cell C3 and on sheet 2 the
destination cells Jan, Feb, March etc.

Is there a way to have my running total populate the correct months figures
while keeping the previous months total. Just now the user manually inputs
the figures but if I can automate this task it would save time for the user.

I hope that I have explained the problem clearly enough.....

Any help you can provide would be appreciated.

Gav.

The feature that wil help you is called VLOOKUP.

You've left out a lot of information about your workbook, but assuming the
following, maybe you can get the idea from this.......

Your Sheets are named Sheet 1 for destination sheet, and Sheet 2 for your
database.
On your database sheet, Employee ID are in column A, Names in column B and
CostCenter in column C.

Then, in cell b6 of your destination sheet, you enter the Employee ID number.
Then, in the cell where you want the Employee name to appear, put
=VLOOKUP(B6,Sheet2!A:C,2,false)

Then in the cell where you want the CostCenter to appear, put
=VLOOKUP(b6,Sheet2!A:C,3,false)

You can see, the formulas are exactly the same except for the number 2 being
changed to 3. This is the difference to lookup the Name, or the CostCenter,
either 2 or 3 columns to the right of the column with the Employee ID.

Modify the formulas as necessary to fit your application......

Vaya con Dios,
Chuck, CABGx3

"extract data fr. one worksheet to anothe" wrote:

> Dear All,
>
> I have 2 worksheets. 1 is the destination sheet and the other 1 is the data
> sheet where I want information from. I want to extract the following data
> from the data sheet. These are the personnel id, employee name and cost
> center account. What I want is if I fill in the personnel id number in a
> particular cell, that the employee name and cost centre is also extracted in
> to 2 seperate cells respectively.

Hi folks, I need some helps on a task that I have been seeking solution for a long time:
I am seeking helps for automating a task to extract a range of data from one sheet to another . please see example below:
1. user highlights and selects a range of data from an existing spreadsheet, e.g.
......(Col A) (Col B) (Col C) (Col D) (Col E)
row1 Store1 First1 second1 third1 forth1
row2 Store2 First2 second2 third2 forth2
row3 Store3 First3 second3 third3 forth3
row4 Store4 First4 second4 third4 forth4
row5 Store5 First5 second5 third5 forth5

user selects Col A,C and D on row2, row4 and row 5 only
2. an automation to put this selected range of data to another excel file and rearrange the columns, e.g, original (col C and D ) will be in (col A and B) and original (col A) will be (col C). if the file is not already exist, creates it, based on the date .e.g. jan15newdata.xls, if the new data file is already exist then append the data to the existing ones

I hope my description is clear. Any helps would be appreciated.

Hi I want to be able to export data from one worksheet to another. eg when a certain cell matches on the two sheets then other data on one of the rows is copied over to the other sheet. Any help would be much appreciated.

Hi guys.

I need little bit help to make a long code shorter if possible.
Code itself does the following: If cell is not empty then it moves data from one column to another column (to its respective row). I'm using a method or code that I have used in past which it works great but this time I need to do it with nine columns and the code looks rather long as I do not know how to make it shorter.

Please see the code below:

Sub move_data_from_one_column_to_another()
Application.ScreenUpdating = False
Call AB_to_I
Call AC_to_J
Call AD_to_K
Call AE_to_L
Call AF_to_M
Call AG_to_N
Call AH_to_O
Call AI_to_P
Call AJ_to_Q
Application.ScreenUpdating = True
End Sub



Sub AB_to_I()
Dim RowCtr As Double
Dim LastRow As Double
LastRow = Cells(Rows.Count, "A").End(xlUp).Row
For RowCtr = 2 To LastRow
    If Cells(RowCtr, "AB") <> "" Then
        Cells(RowCtr, "I").Value = Cells(RowCtr, "AB").Value
    End If
Next RowCtr
End Sub

Sub AC_to_J()
Dim RowCtr As Double
Dim LastRow As Double
LastRow = Cells(Rows.Count, "A").End(xlUp).Row
For RowCtr = 2 To LastRow
    If Cells(RowCtr, "AC") <> "" Then
        Cells(RowCtr, "J").Value = Cells(RowCtr, "AC").Value
    End If
Next RowCtr
End Sub

Sub AD_to_K()
Dim RowCtr As Double
Dim LastRow As Double
LastRow = Cells(Rows.Count, "A").End(xlUp).Row
For RowCtr = 2 To LastRow
    If Cells(RowCtr, "AD") <> "" Then
        Cells(RowCtr, "K").Value = Cells(RowCtr, "AD").Value
    End If
Next RowCtr
End Sub

Sub AE_to_L()
Dim RowCtr As Double
Dim LastRow As Double
LastRow = Cells(Rows.Count, "A").End(xlUp).Row
For RowCtr = 2 To LastRow
    If Cells(RowCtr, "AE") <> "" Then
        Cells(RowCtr, "L").Value = Cells(RowCtr, "AE").Value
    End If
Next RowCtr
End Sub

Sub AF_to_M()
Dim RowCtr As Double
Dim LastRow As Double
LastRow = Cells(Rows.Count, "A").End(xlUp).Row
For RowCtr = 2 To LastRow
    If Cells(RowCtr, "AF") <> "" Then
        Cells(RowCtr, "M").Value = Cells(RowCtr, "AF").Value
    End If
Next RowCtr
End Sub

Sub AG_to_N()
Dim RowCtr As Double
Dim LastRow As Double
LastRow = Cells(Rows.Count, "A").End(xlUp).Row
For RowCtr = 2 To LastRow
    If Cells(RowCtr, "AG") <> "" Then
        Cells(RowCtr, "N").Value = Cells(RowCtr, "AG").Value
    End If
Next RowCtr
End Sub

Sub AH_to_O()
Dim RowCtr As Double
Dim LastRow As Double
LastRow = Cells(Rows.Count, "A").End(xlUp).Row
For RowCtr = 2 To LastRow
    If Cells(RowCtr, "AH") <> "" Then
        Cells(RowCtr, "O").Value = Cells(RowCtr, "AH").Value
    End If
Next RowCtr
End Sub

Sub AI_to_P()
Dim RowCtr As Double
Dim LastRow As Double
LastRow = Cells(Rows.Count, "A").End(xlUp).Row
For RowCtr = 2 To LastRow
    If Cells(RowCtr, "AI") <> "" Then
        Cells(RowCtr, "P").Value = Cells(RowCtr, "AI").Value
    End If
Next RowCtr
End Sub

Sub AJ_to_Q()
Dim RowCtr As Double
Dim LastRow As Double
LastRow = Cells(Rows.Count, "A").End(xlUp).Row
For RowCtr = 2 To LastRow
    If Cells(RowCtr, "AJ") <> "" Then
        Cells(RowCtr, "Q").Value = Cells(RowCtr, "AJ").Value
    End If
Next RowCtr
End Sub
The code is still efficient and performance wise its ok. But if someone know how to make it shorter that would be nice to know.
I have attached spreadsheet that has the code and it has sheets Before and After. just hit the macro button "Run Code".

Any help is appreciated
Cheers).Value = Cells(RowCtr,AJ

I want to Copy the first two or three letters of a cell to another one in Excel

I have to format a report of cases weekly. It involves moving data from one column to another. I would like to record a macro that does this for me. the only problem is that the rows where the data is found can change slighty by week to week. can i make my macro pick up on whether if a cell is empty or if contains text and if it contains text then to move the data to another column on the same row?

Hey guys,

I'm looking for a method (I'm assuming it's some type of macro here) to automatically move data from one sheet to another upon entry of data. What I want to happen is when certain conditions are met in an individual cell on the first sheet (we'll call it Sheet A), it'll automatically cut the entire row that cell is contained in from Sheet A and paste itself into a new row on a new sheet (we'll call it Sheet B). From what I've been able to gather from looking around online, it has something to do with VB, but I have absolutely no experience with VB, so I'm at an impass. If anyone has any solutions, please put it in as simple of terms as possible


No luck finding an answer? You could always try Google.