+ Reply to Thread
Results 1 to 7 of 7

Stop Query from refreshing empty cells

  1. #1
    Registered User
    Join Date
    08-16-2018
    Location
    Cape Town, SA
    MS-Off Ver
    Office 365 ProPlus
    Posts
    4

    Stop Query from refreshing empty cells

    Hi All,


    I am a relative newbie to the Excel universe. Coming from Architecture I have had very little need until now where we are working on a monster hospital. Needless to a say a whole new world has been opened.

    My dilemma:

    I have linked a txt file that is a REVIT(3D modelling program) export via query into my Excel document.

    Some of the cells are blank and I cannot change them in the REVIT because of the parameters used in the Schedule I am exporting.
    I was hoping to manually input these fields in the Excel document which is all good and fine until I refresh and the Query at it re-imports the blank cells again.


    Is there any way of forcing the Query to not import any cells that are blank, therefore not affecting the manual input information?

    Thanks

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Stop Query from refreshing empty cells

    There are several ways to "query" information into Excel. We'd need to see more.

    Modify a copy of the txt file so it does not have sensitive information. A couple dozen rows should be enough to prove the concept. Make sure your have some blank data that is causing your problem. Also include the workbook doing the query.

    I suspect that there is a SQL statement associated with the query and that modifying the where clause will fix the issue.

    Attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Registered User
    Join Date
    08-16-2018
    Location
    Cape Town, SA
    MS-Off Ver
    Office 365 ProPlus
    Posts
    4

    Re: Stop Query from refreshing empty cells

    Hi dflak,

    I have attached the txt export from Revit and a a small piece of the sample schedule.

    BEFORE is how the txt file queries to the Excel with out any changes in the excel. This shows the blank cells which I wish to manually override.
    AFTER includes the manual input information that I wish to remain should I need to refresh the Query from the txt file.

    As I mentioned previously the txt file is an export from our architectural program that we are using so I cannot manually adjust any of the contents here.

    Thanks
    Attached Files Attached Files

  4. #4
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Stop Query from refreshing empty cells

    Here is one way of doing it without VB if you are willing to accept Helper Columns. It is assumed that Door Type is a unique value. Fill in the Table on the Keeper sheet with the values you want to display when the Room Number and / or Room name associated with the door type is blank. Then import the data with whatever method you are doing now. Since the data is imported into a table, the formulas should fill down automatically.

    I can get you exactly what you want, but it will take a bit of vba. Let me know which approach you would like to take.

    Also explain to me the import mechnaizm you use.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    08-16-2018
    Location
    Cape Town, SA
    MS-Off Ver
    Office 365 ProPlus
    Posts
    4

    Re: Stop Query from refreshing empty cells

    Thanks dflak,


    The Door Type column is unique so this solution will work.


    I was really hoping to keep things simple as this schedule will ultimately be delivered to the client and if I build in too much complexity it could cause issues when they start working with it, which leads me to another question. Am I able to purge all background operations and hidden columns/rows before sending it off?


    Excuse my ignorance but what exactly is vba?


    The import is from an architectural program called Revit, one has the ability to schedule in the program however nothing close to the power of Excel, it is cumbersome and slow hence the transfer to Excel. The connection is not bidirectional, so it is a straight export to a txt file. If there are changes to door schedule, I just re save over the txt and it updates.


    Regards

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,719

    Re: Stop Query from refreshing empty cells

    VBA = Visual Basic for Applications

    It's the code used in Excel to write macros and other coded solutions.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  7. #7
    Registered User
    Join Date
    08-16-2018
    Location
    Cape Town, SA
    MS-Off Ver
    Office 365 ProPlus
    Posts
    4

    Re: Stop Query from refreshing empty cells

    Hi dflak,


    I have implemented your formula and it works perfectly.

    As is the case I suppose with a lot of these things, one needs to be open to doing things slightly differently than one originally envisaged, as long as the end result is achieved.


    Thanks a lot for this.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Stop code from running when a range of cells are empty.
    By Neuk in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-22-2018, 04:09 PM
  2. Replies: 0
    Last Post: 03-26-2013, 04:38 PM
  3. How to stop plotting empty cells in a dynamic area chart
    By latha2002 in forum Excel Charting & Pivots
    Replies: 14
    Last Post: 12-20-2012, 03:46 AM
  4. Refreshing only certain cells of a web query based on a condition
    By sjfit4 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-15-2010, 06:52 AM
  5. To Stop Refreshing the data
    By icemantj in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-12-2010, 05:43 AM
  6. [SOLVED] How do I stop the SQL Login screen when refreshing a query.
    By Elbmag in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-01-2006, 11:45 PM
  7. [SOLVED] How do you stop excel from charting empty cells/null values as zer
    By Abe-air in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 03-20-2006, 08:10 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1