Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Data delete and mass copy/paste with macro questions

Good afternoon,

First off I want to say that I know pretty much nothing about Excel macros.
I started trying to put one together early this week for a personal database
project that I'm working on, and while it's doing some of the things that I
want, I don't know how to do some of the additional things that I really need
it to. As such, I was hoping that some expert out here would be able to help
me.

The database that I'll be working with is currently 3500 rows and
approximately 30 columns wide on a single worksheet. I've gotten the code to
be able to sort the data how I want it, and I can get it to delete data based
on an array delete code. However, because I want to be able to run the macro
for any one of the currently 5 data values that I'm basing my delete on,
would I be able to use an input box to tell the macro to keep all rows with
that particular value and to delete all others?

The second question that I have may be a little tougher to puzzle out. Once
I have the data truncated down by the particular value that I'm looking for,
I've got the code generating new sheets into the workbook for each unique
value in the first column and renaming the sheets based on that value, which
is what I want, sort of. The macro is currently only copying and pasting the
data from the first 4 columns into the new sheets, which is my initial sort
and search criteria. What I want to have the macro do is, as it is
generating each sheet, to look at a particular cell (it will be the same cell
in all sheets) and paste a range of data from one of two other sheets based
on what the value in that cell is. I know that I probably need to use an
if/elseif/else statement to do this, or possibly an if/else statement where
the if value is X or Y. But I'm having trouble plugging in the code to do
this and actually have it work. Don't know if it is an issue of placement,
the fact that I don't really know what the code should be, or if I would be
better off having the new sheets generate into a new workbook and do the
copy/paste later in the macro.
Please help.

Also, a BIG thank you goes out to Ron de Bruin for his awesome excel macros
page, without which I wouldn't really even be started with this project.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default Data delete and mass copy/paste with macro questions

Instead of making a sheet for each consider using
datafilterautofilterfilter by the value desired in the first column

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"jpickering74" wrote in message
...
Good afternoon,

First off I want to say that I know pretty much nothing about Excel
macros.
I started trying to put one together early this week for a personal
database
project that I'm working on, and while it's doing some of the things that
I
want, I don't know how to do some of the additional things that I really
need
it to. As such, I was hoping that some expert out here would be able to
help
me.

The database that I'll be working with is currently 3500 rows and
approximately 30 columns wide on a single worksheet. I've gotten the code
to
be able to sort the data how I want it, and I can get it to delete data
based
on an array delete code. However, because I want to be able to run the
macro
for any one of the currently 5 data values that I'm basing my delete on,
would I be able to use an input box to tell the macro to keep all rows
with
that particular value and to delete all others?

The second question that I have may be a little tougher to puzzle out.
Once
I have the data truncated down by the particular value that I'm looking
for,
I've got the code generating new sheets into the workbook for each unique
value in the first column and renaming the sheets based on that value,
which
is what I want, sort of. The macro is currently only copying and pasting
the
data from the first 4 columns into the new sheets, which is my initial
sort
and search criteria. What I want to have the macro do is, as it is
generating each sheet, to look at a particular cell (it will be the same
cell
in all sheets) and paste a range of data from one of two other sheets
based
on what the value in that cell is. I know that I probably need to use an
if/elseif/else statement to do this, or possibly an if/else statement
where
the if value is X or Y. But I'm having trouble plugging in the code to do
this and actually have it work. Don't know if it is an issue of
placement,
the fact that I don't really know what the code should be, or if I would
be
better off having the new sheets generate into a new workbook and do the
copy/paste later in the macro.
Please help.

Also, a BIG thank you goes out to Ron de Bruin for his awesome excel
macros
page, without which I wouldn't really even be started with this project.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Data delete and mass copy/paste with macro questions

I did the autofilter thing the other day. But the data that I'm sorting is
the raw data, and not in a presentation format. It is extremely difficult to
read in the database form, thus the creation of new presentation sheets for
each record.


"Don Guillett" wrote:

Instead of making a sheet for each consider using
datafilterautofilterfilter by the value desired in the first column

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"jpickering74" wrote in message
...
Good afternoon,

First off I want to say that I know pretty much nothing about Excel
macros.
I started trying to put one together early this week for a personal
database
project that I'm working on, and while it's doing some of the things that
I
want, I don't know how to do some of the additional things that I really
need
it to. As such, I was hoping that some expert out here would be able to
help
me.

The database that I'll be working with is currently 3500 rows and
approximately 30 columns wide on a single worksheet. I've gotten the code
to
be able to sort the data how I want it, and I can get it to delete data
based
on an array delete code. However, because I want to be able to run the
macro
for any one of the currently 5 data values that I'm basing my delete on,
would I be able to use an input box to tell the macro to keep all rows
with
that particular value and to delete all others?

The second question that I have may be a little tougher to puzzle out.
Once
I have the data truncated down by the particular value that I'm looking
for,
I've got the code generating new sheets into the workbook for each unique
value in the first column and renaming the sheets based on that value,
which
is what I want, sort of. The macro is currently only copying and pasting
the
data from the first 4 columns into the new sheets, which is my initial
sort
and search criteria. What I want to have the macro do is, as it is
generating each sheet, to look at a particular cell (it will be the same
cell
in all sheets) and paste a range of data from one of two other sheets
based
on what the value in that cell is. I know that I probably need to use an
if/elseif/else statement to do this, or possibly an if/else statement
where
the if value is X or Y. But I'm having trouble plugging in the code to do
this and actually have it work. Don't know if it is an issue of
placement,
the fact that I don't really know what the code should be, or if I would
be
better off having the new sheets generate into a new workbook and do the
copy/paste later in the macro.
Please help.

Also, a BIG thank you goes out to Ron de Bruin for his awesome excel
macros
page, without which I wouldn't really even be started with this project.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel copy/paste questions First Aid Computing[_2_] Excel Discussion (Misc queries) 12 March 7th 10 05:48 PM
Macro to copy & paste data Satish Excel Discussion (Misc queries) 3 December 18th 08 04:50 AM
Mass Delete/Paste Graphics in a Workbook Phil H[_2_] Excel Programming 3 May 9th 06 02:15 AM
Macro to copy, paste in a range and then delete Garry Excel Discussion (Misc queries) 0 March 23rd 06 07:37 PM
Some questions on copy/paste in excel 97 Adam Kroger Excel Discussion (Misc queries) 4 November 23rd 05 01:08 AM


All times are GMT +1. The time now is 11:42 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"