Macro or VBA

I am dumb, but would like to automatically trim down reports that we
get from our IT dept.

We have to delete redundant columns (A,B,C,D,E,G,H,J,K)from each
report. In other words, the only data we want to view is in F,I,J,P.

Can this done more effciently with a macro or VBA/

Could someone give me an example of either so that I could work from
and learn? 

Thank-You

0
10/5/2005 11:28:15 AM
excel.misc 78881 articles. 5 followers. Follow

3 Replies
286 Views

Similar Articles

[PageSpeed] 9

start a new workbook
open one of those report workbooks
record a macro into that new workbook (not the report workbook) when you delete
the columns you don't want.
stop recording

back to that new workbook
save it as a nice name
then when ever you need to delete those columns, you can open this workbook,
then select the report workbook and hit:

tools|macro|macros 
and run that recorded macro against the active workbook.

mike.schmidt@na.sunchem.com wrote:
> 
> I am dumb, but would like to automatically trim down reports that we
> get from our IT dept.
> 
> We have to delete redundant columns (A,B,C,D,E,G,H,J,K)from each
> report. In other words, the only data we want to view is in F,I,J,P.
> 
> Can this done more effciently with a macro or VBA/
> 
> Could someone give me an example of either so that I could work from
> and learn?
> 
> Thank-You

-- 

Dave Peterson
0
petersod (12004)
10/5/2005 11:55:20 AM
range("A:E").clear
range("G:H").clear
range("J:K").clear
etc

<mike.schmidt@na.sunchem.com> wrote in message
news:1128511695.282863.200940@z14g2000cwz.googlegroups.com...
> I am dumb, but would like to automatically trim down reports that we
> get from our IT dept.
>
> We have to delete redundant columns (A,B,C,D,E,G,H,J,K)from each
> report. In other words, the only data we want to view is in F,I,J,P.
>
> Can this done more effciently with a macro or VBA/
>
> Could someone give me an example of either so that I could work from
> and learn?
>
> Thank-You
>


0
pynasocas (62)
10/5/2005 12:01:34 PM
?? J is in both lists ??
-- 
Gary''s Student


"mike.schmidt@na.sunchem.com" wrote:

> I am dumb, but would like to automatically trim down reports that we
> get from our IT dept.
> 
> We have to delete redundant columns (A,B,C,D,E,G,H,J,K)from each
> report. In other words, the only data we want to view is in F,I,J,P.
> 
> Can this done more effciently with a macro or VBA/
> 
> Could someone give me an example of either so that I could work from
> and learn? 
> 
> Thank-You
> 
> 
0
GarysStudent (1572)
10/5/2005 12:07:05 PM
Reply:

Similar Artilces:

Quick Print Macro
When the SOP Quick Print is set up, does this create a macro file somewhere? Or, is it built into the program code? If it's a macro file, where is the file stored? Hi Elaine When I first wrote the Quick Print feature for Named Printers, it did use a macro. This is because a macro was the only automated method I could use to press "Save" on the "Save, Discard, Cancel" dialog. This was because Named Printers was originally a 3rd party addon. When Named Printers became core in v6, the developers could change the original scripts on the SOP_Entry window to avoi...

Combo box change to run Macro
I have a combo box on the frmAssessment with a list of Assessors from a lookup table. I want to send an email to the Assessor who's name is displayed in the box either when a new entry or a change of names when editing. I created a macro with a condition of [RNAssessor] = "Jane Doe" and the action SendObject with Jane Doe's email address - similarly for each Assessor's name. The problem I'm having is I cannot get the event to trigger. I tried the OnChange and AfterUpdate events and they don't work. Any help you can give me will be much app...

Macro "If Then"
I want to use a macro to cut a range of data and place it into a different worksheet. It looks like this: Cell A6 is a Validation list with 3 names. Each name represents a set of data which each have their own named worksheet. The data is keyed into A7:A15. The 3 types of data need to be sent to the correct worksheet and pasted at the bottom of the data base, and the cursor needs to be returned to cell A6 (validation list)of the first sheet. I can get the macro to run one "If Then arguement", but I do not know how to tie in the remainding 2 worksheets. Hope I explaine dmy probl...

VBA Programming help
Hello, I have an Excel file with 2 worksheets. One containing Order Info called "Orders" and another named "Analysis" which contact some fixed data and two columns for automatic fill in from the "Orders" sheet. I would like to create a code or macro when execute, transfer the Order# and Prod Start columns from the "Orders" sheet to "Analysis" sheet taken the Qty into account. so, if the order# has a quantity of 2, then it will fill in two rows for one Order. The sample data is below. Thanks for any help. Analysis sheet: Line...

Outlook
I have an Excel spreadsheet - and every day I have to copy the data to an email. I'd like to create a macro that pulls the subject from cell G7, copies the range of data from cells A15:B100 for example then pastes special formatted text into the email body and puts a specific name into the "To" field. I'm comfortable with Excel macros but close to clueless with Outlook macros. Would this be done from Outlook or from Excel or what? Any help is appreciated. You'd need to do some VBA coding to do that in Excel or Outlook. Might actually be easier to use ...

Macro to open file bypasses Auto_Open
I have the following code. Workbooks.Open Filename:=vOpen, UpdateLinks:=3 But when I run this it does not process the macro Auto_Open. Why is this? I would like for code to run on the opening of the file regardless of how the user opened it. (ie. If they opened it using File / Open on the menu then yes, the Auto_Open would run. But I also want code to run even if they write their own macro to open it.) Thank you, Steven That's the way excel was designed to work. Lots of times, developers want to open the workbook without having that macro run (maybe they&...

Need to use VBA to put image on a form
Hello folks, I need to have an event-fired sub put an image on a form. It needs to be fired when the form is advanced to the next record. I don't know how to code it. Thanks -- Earl Kiosterud www.smokeylake.com I think that was a bit too terse. The image I want to put on the form is a jpg image, the file name of which I'll be able to get from a field in the record in the associated table. There's an image for each record. -- Earl Kiosterud www.smokeylake.com Note: Some folks prefer bottom-posting. But if you bottom-post to a reply that's already top...

saving macros excel 97
i have a user who is asking if he can save his macros and how? we are upgrading him to office xp 2002 thanks Macros are stored in workbooks. Upgrading doesn't remove any user files. On Thu, 5 Aug 2004 07:21:01 -0700, "Antz" <anonymous@discussions.microsoft.com> wrote: >i have a user who is asking if he can save his macros and >how? we are upgrading him to office xp 2002 > >thanks > ...

Excel 2003 - VBA
I am running into the preverbial wall. I keep reaching a dead end when I try to figure out how to locate the address of a cell found during a search. I'm fairly sure it can be done, because I think I have used it in the past, but searching for its use has been fruitless. Is there something that I can wrap around the following statement that will give me the column number? If so, what? Range(Cells(5, 7), Cells(5, 251)).Find("SAM501").Select The answer to this quest will permit me to finish this task and would be much appreciated. Thanks, Craig This will fail if "sam501&...

How do I draw a floating cluster Gantt Chart with VBA.
In this case, I want to use VBA only. No Scheduling tools. My field of application is Construction where you repeatedly compare Schedule of Estimated Data, Actual Data and Final Forecast. The following data would drive a floating cluster of 3 bars, Estimated, Actual and Forecast Finish from the current Report Date. Activity# | Estimated Start | Estimated Finish | Actual Start | Actual Finish | Forecast Finish | % Complete Dim's ..... Set Series = ....... Set ReportDate = .... For I = 1 to Ser.Points.Count Draw Estimated bar from Estimated Start to Estimated Finish [Blue 1...

link in macro
i would like a link in a macro but dont know how i can give it. i mean i have a macro and use an adress like this http://ad..... of course i want to copy something from there to my work sheet. Help me please. thanks. If desired, send your file to my address below. I will only look if: 1. You send a copy of this message on an inserted sheet 2. You give me the newsgroup and the subject line 3. You send a clear explanation of what you want 4. You send before/after examples and expected results. -- Don Guillett Microsoft MVP Excel SalesAid Software ...

Links or macros?
What is the best way to save data from one identical worksheet to another on a server, without having to remember to manually update? Any help would be appreciated. Thanks, Bonnie Bonnie, Links to other unopened workbooks in Excel are exteeeeeeeeeeeeeeemly slow. Unfortunately, whetever Lotus did to make their links update like lightning, the folks at MS couldn't duplicate. My suggestion would be to save the sheet on the server via a macro. Post back with more specifics and someone will surely help you out with this. John "Bonnie" <anonymous@discussions.microsoft.com&...

commandbar submenu VBA syntax
I can use the following to get to the top item in a commandbar, but how do I get to a submenu item? Application.CommandBars("mbMainCC").Controls("Print").Enabled = True Jennifer "Toxalot" <toxalot@gmail.com> wrote in message news:1187584935.864428.76900@r34g2000hsd.googlegroups.com... >I can use the following to get to the top item in a commandbar, but > how do I get to a submenu item? > > Application.CommandBars("mbMainCC").Controls("Print").Enabled = True > > Jennifer > here is some sample of "walking&qu...

Macros with small difference??
I have a macro that fills a column of cells with white and puts N O F I E L D T R I P S T H I S Y E A R vertically. I want this macro to run on a different set of cells (for different years, e.g. 2003, 2004 etc.) but with the same actions. Is there a short way of doing this other than copying and pasting the macro into 6 different macros, just changing the cell references? Thx for help people KrisB_bacon --- Message posted from http://www.ExcelForum.com/ Hi, If you make the cell reference variable you will be able to use it how you like without retyping the macro for different c...

automatic macros day 2
Thanks everone, it finally works!!!! Great Another question about this: If I want to have more then one macro run when the file opens do I just add more at the same spot in this workbook? Example: Public sub workbook_open() Macro18 end sub Public sub workbook_open() Macro41 end sub I kind of doubt it, this would be too easy! LOL Thanks You asked same question in you original thread where it was answered to call two macros (or just combine the macros).. It is (usually) best to stick to a single thread when continuing something. So that someone searching archives can see ...

Run conditional macros
Hi, I wonder if there is a way to run macros conditionally (using the I function). For example, if the value of cell A1 is "up" run the macro "go up" an if the value is any other thing, run the macro "stay there". I appreciate in advance any help that you can provide me in thi matter. Ande -- Message posted from http://www.ExcelForum.com Ander You will need to install a Worksheet_Change macro in the workshee module sheet Private Sub Worksheet_Change(ByVal Target As Excel.Range) If Target.Address = "$A$1" Then Select Case Target.Value Case &q...

Macro
I'm having trouble recording a macro that will insert slashes into a cell that already has data in it. For example, a cell contains the following data "20080723" and I want to create a macro, using "relative references" that will insert slashes as follows "2008/07/23." In other words, I want the macro to create the slashes in that location in the cell regardless of what is in the cell. For example, if the cell contains 20061103, I want the end result to be 2006/11/03. However, when I run the macro, I still get 2008/07/03, regardless of what i...

Macro for checkbox (2)
Hi Still does not work new message is Sub or function not defined. I normaly just record macros so this is a bid more of a chalange Sub Macro1() ' ' If CheckBoxes(46).Value = True Then Range("O54").FormulaR1C1 = "50000" Range("T54").FormulaR1C1 = "4000" Range("Y54").FormulaR1C1 = "4000" Range("AD54").FormulaR1C1 = "4000" Range("AI54").FormulaR1C1 = "4000" Range("AN54").FormulaR1C1 = "4000" Range("AS54").FormulaR1C1 = "...

Macro to change pivot field
This is a re-post as my questions hasn't been answered by anyone... Hi there and thank you in advance for any help. I have written a macro that changes (hides / shows) fields on a pivot table. One of these changes the field used for the page fields section of the pivot table. However, when i add a field to this section, it defaults to All. How can have this field default to the latest value in this field. Let me explain further: I want the pivot to be shown either by date or by week. The macro then changes the page field section to show either the date or week field. If ...

Sudden problem with Excel workbooks containing VBA
Excel 2000 on Windows 2000 Compaq Evo notebook suddenly takes an excessive time to open and close workbooks with VBA macros. CPU resource is almost entirely used by Excel.exe during the open or close process. These workbooks previously worked fine. It seems to be restricted only to workbooks with VBA macros. Virus scan doesn't show any infection. Otherwise, Excel works fine when workbooks finally open ....???? It never hurts to empty the windows temp folder (with excel closed), but it may not help. You may want to take a look at these two sites (Charles Williams and David McRitchie): ht...

Stopping VBA with Escape Key
I have a customised DLL file with some custom functions. Is it possible to hit the ESCAPE key while the function is running, and if so how do I implement this through VBA Thanks in advance aa ...

Macro recording toolbar missing
why can't I see recording toolbar with stop and absolute/relative button while recording macro in Excel 2000? Hello Keep the Visual Basic Toolbar visible in Excel and thus you will have access to any option: View, Tool bars, Visual Basic and place the tool bar somewhere near the standard tool bar for example. Each time you will launch Excel, the VB tool bar will be there. HTH Cordially Pascal "Rai" <Rai@discussions.microsoft.com> a �crit dans le message de news:0CFBDB03-AB8B-430C-ABAF-6FB93DC52BA9@microsoft.com... > why can't I see recording toolbar with stop and ...

VBA variable definition help needed.
Hi all! I have run across an issue with data retrieval. At the company I work for, the year runs from November 1, 2008-October 31, 2009. In one of our forms, the user will enter a date such as 11/1/2008 in cell B2. Our path for data retrieval is m:\2009\SALES TEAM\Midwest Territory.xls. For two months (nov and dec) the year will be 2008. How can I change the mYear variable below to accomodate the year 2008 when it actually resides in the 2009 folder? My apologies, I'm very new to excel and VBA. Thanks. sdate = Range("B2").Value mYear = Format(sdate, "...

Hide rows using VBA
Hi, I am trying to hide rows with a specific value. In my sheet I have three columns: Date - The manually inputted date Today - 1 Month - 'TODAY() -31' (this column will be hidden) In Range? - an IF statement to say "HIDE" or SHOW" (this column will be hidden) I am looking to hide all the rows where Hide shows in the In Range? column. I would also like this to run on opening the document Any advice is gratefully received as my vba skills are almost non existent. cheers Dave ...

Excel VBA Column
Hi, This is about Excel VBA. How do I detect if the active cell is in Column A or not ? My pseudo code is like this: If any active cell is selected within Column A then Process normally else 'current active cell is in other columns MsgBox "You are not in Column A", 16 please help. thanks. Regards, Magix If Activecell.Column = 1 Then ... -- HTH RP (remove nothere from the email address if mailing direct) "magix" <magix@asia.com> wrote in message news:435fa580$1_2@news.tm.net.my... > Hi, > This is about Excel VBA. > How do ...