Ad Code

Responsive Advertisement

Ticker

6/recent/ticker-posts

How to Automatically sheet copy and data entry in Excel By CFB

 It has been told in this video that if you have an Excel seat made and you copy it repeatedly and change the data of the copy seat then you can do all this with the help of just one click. Formula has to be applied, it is mentioned in this video.





You can make your work much easier by using this formula.


In this formula, the code USE is given below

Code:-

Sub Create()

'Created by C Tech

Dim I As Long

Dim xnumber As Integer

Dim xactivesheet As Worksheet

On Error Resume Next

Application.ScreenUpdating = False

Set xactivesheet = ActiveSheet

xnumber = InputBox("Enter number of sheet")

For I = 1 To xnumber

xname = ActiveSheet.Name

xactivesheet.Copy after:=ActiveWorkbook.Sheets(xname)

ActiveSheet.Name = “Sheet-“&I

Next

xactivesheet.Activate

Application.ScreenUpdating = True

End Sub


Code :-2

Sub Create()

'Created by C Tech

Dim I As Long

Dim xnumber As Integer

Dim xactivesheet As Worksheet

On Error Resume Next

Application.ScreenUpdating = False

Set xactivesheet = ActiveSheet

xnumber = InputBox("Enter number of sheet")

For I = 1 To xnumber

xname = ActiveSheet.Name

xactivesheet.Copy after:=ActiveWorkbook.Sheets(xname)

ActiveSheet.Name = InputBox("Enter name of sheet")

ActiveSheet.Range("b2") = InputBox("Enter Account Of")

ActiveSheet.Range("b3") = InputBox("Enter Address")

ActiveSheet.Range("b4") = InputBox("Enter Contect Number")

ActiveSheet.Range("d4") = InputBox("Enter Email Id")

ActiveSheet.Range("a7:d500").ClearContents

Next

xactivesheet.Activate

Application.ScreenUpdating = True

End Sub


Post Navi

Post a Comment

0 Comments

Ad Code

Responsive Advertisement