Export Excel data to CSV

Mcozzy

New Member
Joined
Apr 1, 2009
Messages
21
Hey,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:eek:ffice:eek:ffice" /><o:p></o:p>
<o:p></o:p>
I'm pretty new to VB and macros and my current searches have found a lot of coding that i haven’t been able to look at and change according to my needs.<o:p></o:p>
<o:p></o:p>
For my work we get people ordering various amounts codes and units, these units needs to be converted to boxes, this much i have managed to figure out and do. <o:p></o:p>
<o:p></o:p>
But now i need to create a button on the order input page that when clicked will export the inputted data (and the auto populated data) to a .csv file ready to be uploaded to the in-house system.<o:p></o:p>
This is where i have come up with no way to do this, the amount of rows could vary depending on how many different products are ordered, but the columns are always fixed (D:I). <o:p></o:p>
<o:p></o:p>
Any help would be appreciated<o:p></o:p>
<o:p></o:p>
Oz<o:p></o:p>
 
I tried that code, But because the cells in the rows F - I have formula in them it still picks up all 1000 rows.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:eek:ffice:eek:ffice" /><o:p></o:p>
<o:p></o:p>
How could I modify the macro so it searched for the last row of data using only column E but copied column E:I?<o:p></o:p>
<o:p></o:p>
Oz<o:p></o:p>
<o:p> </o:p>
 
Upvote 0

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Simply modify the command I gave you to this:
Code:
Range("E16:I" & Range("E65536").End(xlUp).Row).Copy

Note the:
Range("E65536").End(xlUp).Row
part is the section that searches for the last row. So just use the column reference you want to search.

The:
Range("E16:I"
Tells it to select/copy columns E to I.
 
Upvote 0

Forum statistics

Threads
1,213,550
Messages
6,114,265
Members
448,558
Latest member
aivin

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