creating basic macros in excel

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to run a simple macro that filters out data. For example, I have
a spreadsheet with ten columns. However, I do not need all 10; I want to
select particular columns and re-arrange them in a specific order. I think
this is pretty basic so any help would be appreciated. I tried the filter
function but I couldn't do anything on it.
 
A good starting point for this is the macro recorder. Turn it on
(Tools>Macro>Record new Macro...), give it a name, then do the steps
manually. You than have a macro that does what you executed, and you can
examine to learn from.
 
Taking what you say at face value, simply record a macro while you do the
following.
Say that you want to select 4 of the 10 columns and arrange them in some
order and delete the remaining columns.
Insert 4 blank columns to the left of all your data.
Select each column that you want to keep, one at a time, and copy/paste that
column in one of the four blank columns you just inserted.
Repeat for the other 3 columns.
Delete all the other columns.
Done
Post back with more detail about what you want to do if this doesn't fit
your needs. HTH Otto
 
Back
Top