Help with Updating a Current Macro

Dear Sir/Madam,  in the attached spreadsheet, I have a Macro that was designed that is not running exactly the way I need it be run.  The Macro copies data from one tab, based upon a value, into the corresponding tabs.  In the attached spreadsheet, on the "EE Help Needed" tab, I have explained what is going on and what I need it to do.  I have also copied the Macro code into a Word document since I recall when I load the spreadsheet the Macro code does not load up with it.  Thank you very much for your time and expertise!   James.
Experts-Exchange-Question-012714.xlsm
Macro-Code-for-Experts-Exchange-.docx
James0903Asked:
Who is Participating?
 
RartemassConnect With a Mentor Service Desk AnalystCommented:
I've made a change to the code again to make things work easier in my logic.
This removes the Yes in column J from the data. How is it now?
TEST-2013-Medical-Expenses-TEST2.xlsm
0
 
RartemassService Desk AnalystCommented:
I've taken a quick look at the code for NonFSAEligible.
I have tested the code as is and then commented out the lines that deal with the Non eligible stuff and ran again. The results look fine to me. Please test and let me know if it's OK.

Here is the updated file. Experts-Exchange-Question-012714.xlsm

The lines I commented out are below. Each line starting with an apostrophe (') will not run.

  
        'Create Not Reimbursable worksheet if it doesn't already exist
    'On Error Resume Next
    'Set NonFSAEligible = myWkb.Sheets("Non-FSA Eligible")
   ' If NonFSAEligible Is Nothing Then
    '   Set NonFSAEligible = myWkb.Worksheets.Add(after:=myWkb.Worksheets(myWkb.Worksheets.Count))
     '   NonFSAEligible.Name = "Non-FSA Eligible"
    'End If
    'NonFSAEligible.UsedRange.ClearContents
    'On Error GoTo 0
    With myInSht
        Set rg = .Range("A1").CurrentRegion
        rg.AutoFilter
        rg.AutoFilter Field:=13, Criteria1:="<>"
        'rg.Copy NonFSAEligible.Cells(1, 1)
        rg.AutoFilter Field:=13, Criteria1:=""
        'NonFSAEligible.UsedRange.EntireColumn.AutoFit
    End With

Open in new window

0
 
James0903Author Commented:
Rartemass, thank you.  The code works not to create the Non-FSA Eligible tab.  Will you be able to perform the other steps I outlined on the "EE Help Needed", rows 19-27?  Thank you.   Update spreadsheet attached.
TEST-2013-Medical-Expenses-TEST.xlsm
0
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

 
RartemassService Desk AnalystCommented:
For the total in each tab, where would you like the total? The simplest place is at the top of the sheet and have it already present. This way the macro doesn't need further coding for that step.
This is basically what I mean:
Example of totals and formula
I'll have a look at number 3 tomorrow as I've been flat out today and haven't had a chance to address this.
0
 
James0903Author Commented:
Rartemass, yes, total on top is good with me.  Thank you.
0
 
RartemassService Desk AnalystCommented:
Sorry I've been absent for a few days, I've been quite busy. I'll look into this again on Monday unless someone else beats me to it.
0
 
James0903Author Commented:
Sounds good, thank you.
0
 
RartemassService Desk AnalystCommented:
Is this what you are after?
TEST-2013-Medical-Expenses-TEST.xlsm

Sorry it took so long but it has been a hellish week at work.
0
 
James0903Author Commented:
Rartemass, same here.  My little one is under the weather which is why it took me a few days to get back to you.  My apologies.

In regards to the file, I'm sorry, I do not see any differences.  Am I missing something?  Example: I ran the macro and on the 'Facility' tab there are rows containing 'Yes' in column J of the "2013 Expenses" tab.  All "Yes"'s in column J should not be placed into the corresponding tabs.  Please let me know your thoughts or if an earlier version of the spreadsheet was loaded.  Thank you.
0
 
RartemassService Desk AnalystCommented:
I was looking at that item next.  The bulk of the last update was the final tab.
0
 
RartemassService Desk AnalystCommented:
I've been looking at this and realised the wrong version was uploaded.
Here is the correct one. It concentrated on the Non-FSA Miles tab.
The J column still contains yes rows. Still looking at this to remove those from the macro. In the short term an auto filter will remove them from the view.
TEST-2013-Medical-Expenses-TEST.xlsm
0
 
James0903Author Commented:
Rartemass, thank you.  I will take a look and will advise.
0
 
James0903Author Commented:
Rartemass, this is great!  Thank you.  This will save me hours of work.  I really appreciate your help!
0
 
RartemassService Desk AnalystCommented:
No worries, glad it works.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.