formula/code/vba

Vishaal

Well-known Member
Joined
Mar 16, 2019
Messages
533
Office Version
  1. 2010
  2. 2007
Platform
  1. Windows
  2. Web
There is any code or vba or formula which can do the following

1. We are copying a data/formula
2. Now we want to paste it as values in a active cell,

My problem is that every time data size is changed so formula/code/vba will work when we use that command/vba/code for paste values on that cell
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
I have written my own macro which I store in my personal.xlsb file and I have allocated a short cut key to it. I use Ctrl Q . It does a "pastevalues" into the active cell:
Code:
Sub Pastevalues()
'
' Pastevalues Macro
'
' Keyboard Shortcut: Ctrl+q
'
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False
End Sub
 
Upvote 0
No, its not working in my case,

we want paste on next sheet/next workbook, we are not pasting on same sheet and every time data is changed

we want when we copy the data and on next workbook/sheet when we paste it we dont want to select paste special and after that select values, just need a vba/code so that we can paste it without this long process
 
Upvote 0
Maybe you didn't understand how to use because it will happily paste between workbooks, all it does is do a Pastevalues using a command key.
Try selecting a cell on a workbook type Ctrl C ( i.e copy) then select a new workbook and run the macro it will do a paste value in the new workbook

we want paste on next sheet/next workbook, we are not pasting on same sheet and every time data is changed
this requiremnt is not clear what do you mean by "every time the data is changed"
 
Last edited:
Upvote 0
we have tried again as you told but its not working

I mean i have just copy the sheet 1, A2:C15, now we want to paste it through macro on new workbook on cell d16
now again next day
i have just copy the sheet 1, E15:G20, now we want to paste it through macro on new workbook on cell M20

in the above case your code will work, pls confirm
 
Upvote 0
works fine for me.
Where have you put the macro? and have you assigned a short cut key to it?
 
Last edited:
Upvote 0
i have copy your code and on macro created a new module and paste it

but it not working after that
 
Upvote 0
Thanks offthelip for your help

its working fine, we need to create macro manually, only then its work....
 
Upvote 0

Forum statistics

Threads
1,214,608
Messages
6,120,500
Members
448,968
Latest member
screechyboy79

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