Solved

refreshing data in Excel spreadsheet that has named fields

Posted on 2014-10-03
11
86 Views
Last Modified: 2014-10-07
Experts,

I have an Excel spreadsheet that I refresh each month with new data.  Currently I am just pasting the new data over the old data because I have named fields that are used on other sheets for calculations using formulas.

Is there a way through VBA to refresh  tab "Old_Data"  on WorkbookA with "New_Data" from WorkbookB and not lose my named fields.
0
Comment
Question by:morinia
  • 6
  • 5
11 Comments
 
LVL 25

Expert Comment

by:ProfessorJimJam
Comment Utility
IS YOUR NAMED fields are dynamic range?
0
 

Author Comment

by:morinia
Comment Utility
Attached is a sample of one of the field definitions.   It is using an entire column.
Named-Field.PNG.doc
0
 
LVL 25

Accepted Solution

by:
ProfessorJimJam earned 500 total points
Comment Utility
check the attached files, one is old data main one and the other is new one.  

RUN THE MACRO "REFRESHSHEETFROMANOTHERWB" which is IN WORKBOOK A  .

it is tested and it works.

let me know the result.
WORKBOOKA.xlsb
WORKBOOKB.xlsb
0
 

Author Comment

by:morinia
Comment Utility
It works perfectly when there is one worksheet in  workbook.  My challenge is I have more than one worksheet in both workbooks.
0
 

Author Comment

by:morinia
Comment Utility
I can create a separate workbook each respective "New Data" sheets  but the "Old Data"workbook has multiple sheets
0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
LVL 25

Expert Comment

by:ProfessorJimJam
Comment Utility
you did not mention that you have more worksheets.  check your initial message.  the macros that i have created is exactly as per your request.

so can you elaborate how many worksheets in Workbook A and how many Worksheets in WorkbookB exists and which worksheets and thier names from B needs to be copied in how many worksheets of Workbook A?
0
 

Author Comment

by:morinia
Comment Utility
I am sorry for the understating.  I thought I could take the code and modify it .

 I can create a separate workbook for each input sheet.  Medical Hospital Inpatient and Outpatient

The workbook to be updated has four sheets that are to be refreshed  The entire workbook has 22 sheets.  

The other sheets use the data from the refreshed sheets through vlookups and sumifs.

The sheets to be updated are:   Medical Hospital Inpatient and Outpatient
0
 
LVL 25

Expert Comment

by:ProfessorJimJam
Comment Utility
can you post a dummy example and explain how you want it. so that, i could get it right this time.
0
 
LVL 25

Expert Comment

by:ProfessorJimJam
Comment Utility
becuase your last explanation is still not clear.   so the four sheets to be updated are in workbookA right?
and what are the other sheets in workbookB to serve as a source of data for the WorkbookA sheets?
0
 

Author Comment

by:morinia
Comment Utility
I will create four workbooks:

There are four workbooks:  
     Medical
     Hospital
     Inpatient
     Outpatient

They will be used to update the respective sheet on Old_Workbook which has multiple sheets.  The "sheets"  to be updated have the same name as the individual workbooks listed above.
0
 
LVL 25

Expert Comment

by:ProfessorJimJam
Comment Utility
from your initial thread question,   I have provided you with what was needed exactly as per your question.

now, you have came up with additional request, it would appropriate to mark this thread as accepted completed.
and open a new thread, so that we look at that as a new requirement of solution for excel workbooks.
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now