Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 313
  • Last Modified:

Formula to copy cell to another cell

I have a cell that I want to fetch the value from another cell. I want it to copy all the stuff from the cell, like the text in it, the text type, the background color, the text colour and so on. How do I do that? Is it possible to do by refereing in the cell that I just dont want to get the text in it?
0
mdoland
Asked:
mdoland
  • 3
2 Solutions
 
Ingeborg Hawighorst (Microsoft MVP / EE MVE)Microsoft MVP ExcelCommented:
Hello,

you cannot do that with formulas. You either need to copy and paste the cell manually, or use VBA to do that.

Would that be an option?

cheers, teylyn
0
 
gtglonerCommented:
There's no formula that does that, but there is some VBA that will....

Selection.Copy
    Range("A1").Select
    ActiveSheet.Paste

This code takes the formatting as well as the contents from one cell and inserts it into (in this case) Cell A1.
0
 
Ingeborg Hawighorst (Microsoft MVP / EE MVE)Microsoft MVP ExcelCommented:
Use this code in the Sheet module.

Any change you make to cell A2 will be reflected in cell F2.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

        Range("A2").Copy Range("F2")

End Sub

Open in new window


cheers, teylyn
0
 
Ingeborg Hawighorst (Microsoft MVP / EE MVE)Microsoft MVP ExcelCommented:
gtg, selecting cells is slow and hardly ever necessary.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now