ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   last cell and copy (https://www.excelbanter.com/excel-discussion-misc-queries/152285-last-cell-copy.html)

BNT1 via OfficeKB.com

last cell and copy
 
Hi

I want to use VBA to copy columns a,b,c,e,f,g (excluding D as this is hidden)
together with the last 6 columns that have values in, into another sheet. The
cells that are blank do have formulas in them, but appear blank. My main data
starts in row 4, with the other rows above being column headers etc.. I have
attempted to record a macro, and inserting activecell.end(xltoright), which
gets me to theend cell, but get stuck on how to copy the preceeding 5 columns

Any direction/coding appreciated

Brian

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/200707/1


Dallman Ross

last cell and copy
 
In <75f6581ee8e7d@uwe, BNT1 via OfficeKB.com <u19326@uwe spake
thusly:

I want to use VBA to copy columns a,b,c,e,f,g (excluding D as
this is hidden) together with the last 6 columns that have values
in, into another sheet. The cells that are blank do have formulas
in them, but appear blank. My main data starts in row 4, with


I succeeded at a very similar project last month using Ron
de Bruin's great sample code to start and then changing it
with help from this group.

http://www.rondebruin.nl/tips.htm

E.g., http://www.rondebruin.nl/copy6.htm
"Create a workbook from every worksheet in your workbook"

--
dman



All times are GMT +1. The time now is 02:22 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com