Excel VBA - Copy Paste

Excel VBA - Copy Paste

Tutorialspoint

6 лет назад

391,568 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

janu devi
janu devi - 06.09.2023 04:04

Hi sir, how to disable cut copy paste and enable editing bfor particular sheet through macro code

Ответить
Mukund Anandan
Mukund Anandan - 04.09.2023 17:15

Hi Mr.Pavan, In Copy paste macro, even if I give "TRUE" in the cutcopymode, the dancing lines gets removed. can you please share your view on this. Thank you

Sub copy_paste()
Range("a1:a10") = "CA"

'1st Method
Range("b1:b10") = Range("a1:a10").Value

'2nd Method
Range("a1:a10").Copy
Range("d1:d10").PasteSpecial
Application.CutCopyMode = True


End Sub

Ответить
m. n.
m. n. - 11.06.2023 12:05

thank you sir it was very usefull.
if i want to sellect any rang in the sheet and past the value of specific cell to this range how could i defined the sellected range in vba ?
i can explane my question like that : i have in A1 text for example "David", I want to make a bottun with a macro that every time i sellected a rage of cells and press in the button so the macro past "David" in every cell in the rang. every time i choose defferint rang and press the putton it past David in the new range .. how the macro then looks like ? i tried to put rang(" ") or rang("?") it dosent work
pleas your worthfull help.

Ответить
amare bulla
amare bulla - 24.05.2023 10:33

Thanks very much sir . Great respect for you !!!!

Ответить
Tabla King
Tabla King - 24.12.2022 10:38

copy method of range class failed vba error coming when 2nd method is used

Ответить
Suraj Raj
Suraj Raj - 28.11.2022 14:31

Ok

Ответить
WebWala
WebWala - 20.10.2022 22:45

I TRY THIS BUT IT DIDN'T WORK

Ответить
jagadish shirsath
jagadish shirsath - 17.10.2022 13:35

Microsoft Excel has stopped working Hang on white Windows reports the problem to Microshift...
Create My VBA Application Problem Sir

Ответить
Bhawani Singh
Bhawani Singh - 28.09.2022 12:46

Thank you for your valuable information. If I will pest every 5 minutes gap than what will the code after above code. Please respond

Ответить
GAMES & FUN
GAMES & FUN - 13.09.2022 13:19

Please share an working Excel with code

Ответить
Mahbubur Rahman
Mahbubur Rahman - 22.08.2022 18:08

Sir, I am a new learner of VB. My question if I want to copy single cell and paste in another place based on matching data and continue till the end. How I will do that through VB? Thanks in advance.

Ответить
Saikumar Valrouth
Saikumar Valrouth - 30.07.2022 05:35

Range is not wokring in excel

Ответить
Jayanta Mohanty
Jayanta Mohanty - 28.05.2022 09:52

Thanks a lot. Very useful.

Ответить
SEVETSOLU DOZO
SEVETSOLU DOZO - 16.05.2022 18:49

Now your voice is like melody in my ear.
Sometimes i just listen before sleeping. Want to see your new videos

Ответить
Sidd H
Sidd H - 02.05.2022 15:11

Hi Sir, can you tell what is the limit of records when copy from one sheet to another sheet with copy and paste special one.

Ответить
Simplify Optics
Simplify Optics - 30.03.2022 09:57

Hello sir

I have applied this technique for copying and pasting. My initial values to copy are obtained using some formulae. Say CO71=AH71-$CO$60, the valued is say 0.3573074. Fine. After copying this value and then pasting i should get at CV71 0.3573074. But instead i get some other value. Due shift in columns. Then how to get above exact value.

Ответить
abdulrazak ck
abdulrazak ck - 27.01.2022 17:25

If cell contain a specific text then only copy , how can do it

Ответить
056
056 - 22.12.2021 12:24

Hi how can we insert row with some data in same sheet
Example
I have make a table and I want to insert same table below it by clicking one button
I hope you can answer me

Ответить
SHUBHAM SONI
SHUBHAM SONI - 22.12.2021 07:44

gud video sir

Ответить
Santosh Nair
Santosh Nair - 26.09.2021 10:23

Thank you for the session. If the rows keeps changing , is there any command , which can be used instead of the range say (A1:A10), infact automatically the macro the range from say Cell A1 till the end of the row , till where the data is reflecting. Request if you could provide your assistance. Thanks

Ответить
Rodrigo Tiago
Rodrigo Tiago - 15.09.2021 17:01

Hi. Thanks for your work. I need help on something.
I want to create a VBA Code for a button to paste data from Clipboard on an specific cell.
Can you help?

Thanks again

Ответить
Upen Prajapati
Upen Prajapati - 11.09.2021 13:48

hello sir, i am finding code for copy formula from one cell to end cell where ever data is available. (may be dynamic range). actually i am trying to put formula "=hour(I2)" till end of my data but range is not fix . please help

Ответить
Arun Kumar
Arun Kumar - 19.08.2021 20:58

Excellent. Can you please explain how to copy values/data's from one excel file to another excel.

Ответить
Sujit kumar Singh
Sujit kumar Singh - 28.06.2021 17:47

Any person who has any MACRO requirement. Please let me know,
Will provide you free .

Ответить
Sheetal Kumari
Sheetal Kumari - 26.06.2021 21:53

You explained this concept so easy way. I'm facing so much difficulty to learn VBA. Thanks a lot sir. 🙏

Ответить
Jenifer A
Jenifer A - 16.06.2021 21:08

Instead of defining the range like Range("a1:a10"), how to define the macro automatically copy till the last entry?

Ответить
Pourya Ashena
Pourya Ashena - 26.05.2021 20:53

Can I use this method to copy text paragraphs in a word document to clipboard? if yes how?

Ответить
Japie Erasmus
Japie Erasmus - 27.04.2021 10:34

Hi guys what did you think about to create a watsapp group with the teacher to help each other to create programs

Ответить
Panchanan Paikray
Panchanan Paikray - 18.04.2021 11:49

sir kindly help me
how to create a sort command using vb
and pls give me ur whatsapp no

Ответить
Ruaa Easy Knowledge
Ruaa Easy Knowledge - 25.03.2021 13:13

The VBA coms too difficult but Now it's coming to me naturally. Wonderful teacher I appreciated

Ответить
Qamruddin Mohammedi
Qamruddin Mohammedi - 25.02.2021 05:08

Dear Sir,
Want transfer data from one workbook to another.
Workbook - A
1. Receipt No.
2. Date
3. Name
4. Amount
To Workbook - B in two different Sheets
can you please help to write correct VBA code.

Ответить
AEN DISCOM JAITARAN
AEN DISCOM JAITARAN - 24.02.2021 17:25

I have a work book having 140 sheets and a master sheet. In master sheet I have data in a column which I want to paste each cell data into those 140 sheets in a specific cell. can you please help me

Ответить
Keerthi Prasad
Keerthi Prasad - 16.02.2021 10:11

how to use autohotkey to copy from excel from each cell and paste to someother programm.

Ответить
White Stone Music
White Stone Music - 01.02.2021 17:16

If I have copy a1 to a1 1

Then I want to paste into only
A2 to A3

How it was done
Range I want flexible
A2 To A4 Or A5
Perticler range I have put into Cell c1
Like
4 (Copy Into Just 4Cell)
Or
I have mention it like in cell c1
(A2:A15)

Ответить
Saif Rahman
Saif Rahman - 10.01.2021 11:23

Sir, I have a problem coding in Excel VBA, which needs your guidance.
When executing a macro with the command button in Excel, an error occurs while copying and pasting the formula via VB code.
I want the VB code to run and the previous line formula to be pasted into the next line and the formula to be hidden and protected without any errors. While the rest of the cells remain unprotected for data entry.
Can you guide me in this regard?

Ответить
Raman Ram
Raman Ram - 26.11.2020 18:09

how to copy and paste data from excel to website ???

Ответить
KARTHIK PRASAD A V
KARTHIK PRASAD A V - 03.11.2020 13:45

sir what is the use of using VBA when we can record a macro?

Ответить
Ramzein Mohamed
Ramzein Mohamed - 01.11.2020 05:15

How to paste either no of ROWS below or above ? Example I paste 5 items already second time I past it should paste without overwriting the date I have already pasted instead it should paste either below or above no of preferred ROWS
kindly explain sir

Ответить
Clay Thompson
Clay Thompson - 16.09.2020 23:00

you are the best

Ответить
Manika Chopra
Manika Chopra - 16.09.2020 16:49

Hi sir... I need some help in copy and paste the same above data in next empty cell... Using vba... Can u please help me🙏.
It's really urgent for me... Please sir

Ответить
Shivam Singhal
Shivam Singhal - 03.09.2020 13:57

Sir I am getting this error, pl confirm the meaning " Be careful! parts of your document may include personal information that cant'be remove by the document inspector????

Ответить
Srikanth J
Srikanth J - 15.08.2020 15:50

Nice way of presentation. Sooper

Ответить
Prof. S. K. Roy
Prof. S. K. Roy - 10.08.2020 18:13

Really great Great!!! whenever i try to learn something about excel problem ,i just open the tutorial of pavan lalwani

Ответить
CHANDAN SAMANTA
CHANDAN SAMANTA - 09.08.2020 08:39

Sir your platform is very good. I always learn to easily and fast, and also your teaching is very very good.

Ответить
Mayank Priyadarshi
Mayank Priyadarshi - 03.08.2020 18:08

I m getting a error while writing a code for ex application.cutcopymode=false.
Can anyone explain why it is coming?

Ответить
Atiya noor
Atiya noor - 27.07.2020 17:47

Sir xl me sheet1 ki 1 hi row me jo data hai us data me ham jo bhi box select Karen uski value ko vba ke dwara kise dusri row me copy paste Karen
Sir plz reply

Ответить
Bela Maheshwari
Bela Maheshwari - 27.07.2020 10:57

Sir,how to check for matching cells in different sheets using macros? Please help..

Ответить
antonio de sousa
antonio de sousa - 24.07.2020 20:45

Please provide your email I'd

Ответить
KANUMARLAPUDI KRISHNA KANTH
KANUMARLAPUDI KRISHNA KANTH - 09.05.2020 07:36

Proper way of teaching_Very easy to understand

Ответить