Excel vba code

JCKTDS123456

New Member
Joined
Mar 14, 2016
Messages
4
Sir right now i got vba code.....but can we set two macro in a single excel sheet...


The following code solved my Single problem.


Sub Copy_Paste_Data()

Sheets("Sheet1").Range("A3:<wbr>N1000").Copy Destination:=Sheets("Sheet2").<wbr>Range("A" & Rows.Count).End(xlUp).Offset(<wbr>1, 0)

End Sub



I shall use the above code when I have to export all all kind of data from A3 to N1000. But If I don't want to export the data having no value in column I. If Column I has no value so that row will not be exported to Sheet2...

What I mean to say that if I need all data to export then I shall use the above code and When I need to export data having value in column I then I shall use that code for i am requesting you to make.

So this way my grave problem will be solved..........
 

Some videos you may like

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.

MandeepBaluja

Board Regular
Joined
Jan 28, 2014
Messages
120
Code:
Sub Ignore_Blank_Rows()


Sheets("Sheet1").Range("A1:N1000").AutoFilter field:=9, Criteria1:="<>"
Sheets("Sheet1").Range("A3:N1000").SpecialCells(xlCellTypeVisible).Rows.Copy Destination:=Sheets("Sheet2").Range("A" & Rows.Count).End(xlUp).Offset(1, 0)


End Sub
 

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
55,968
Office Version
  1. 365
Platform
  1. Windows
The OP accidentally hit the "Report" button instead of the "Reply" button. Here is what they posted:
Respected you sir/Mam,
I shall use the above code that you have provided me when I have to export all all kind of data from A3 to N1000. But If I don't want to export the data having no value in column I. If Column I has no value so that row will not be exported to Sheet2...

What I mean to say that if I need all data to export then I shall use the above code and When I need to export data having value in column I then I shall use that code for i am requesting you to make.

So this way my grave problem will be solved..........
 

JCKTDS123456

New Member
Joined
Mar 14, 2016
Messages
4
Thanks for you frame a code for me...............many many thanks to you from the core of my heart....


I have a similar query relating to this code

I shall use the above code when I have to export all all kind of data from A3 to N1000. But If I don't want to export the data if the column has zero. If Column I has no value sothe whole row will not be exported to Sheet2...

What I mean to say that if I need all data to export then I shall use the above code and When I need not to export data of them if the column I has zero.....
so would you modify or add as per above..............please help me..........thanks a lot
 

Watch MrExcel Video

Forum statistics

Threads
1,123,156
Messages
5,600,033
Members
414,356
Latest member
death20

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
Top