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..........
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
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
 
Upvote 0
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..........
 
Upvote 0
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
 
Upvote 0

Forum statistics

Threads
1,213,532
Messages
6,114,177
Members
448,554
Latest member
Gleisner2

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