+ Reply to Thread
Results 1 to 5 of 5

Sorting issue when using IF statements to pull through data

  1. #1
    Registered User
    Join Date
    10-24-2017
    Location
    Portsmouth, England
    MS-Off Ver
    2013
    Posts
    16

    Sorting issue when using IF statements to pull through data

    So I've created a fairly complicated sheet whereby I have a mixture of IF Statements and LookUps that pull data from an initial sheet and puts them in different sheets depending on what certain rows say (I really hope that makes sense!).

    The different sheets dictate actions that need to be taken to a record, and once done I put "yes" in the relevant cell.

    However I need to be able to sort every sheet, and when sorting the primary sheet, the "yes"'s on the other sheets don't sort with it.

    Is there anything I can do to fix this?

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: Sorting issue when using IF statements to pull through data

    Hi aimee,

    It is so hard to understand your question without seeing an example workbook. This sounds like a formula problem where Excel does something different than you expect. Like you are pulling cell $A$1 from another sheet and then sort the data so A1 changes values, and you think Excel will follow where A1 went..??

    To better help you, we'd need a sample workbook.

    Attach a sample workbook. 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 test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    10-24-2017
    Location
    Portsmouth, England
    MS-Off Ver
    2013
    Posts
    16

    Re: Sorting issue when using IF statements to pull through data

    Hi Marvin

    I realised that my enitre sheet was entirely flawed, so I fixed my issue by using a copy and paste as values only Macro.

    This worked really well, however does not update automatically, and quite often lags my workbook.

    I tried fixing the update issue by using an auto run Macro VBA in the code of each sheet. However the entire workbook weirds out every time I edit a cell, and after 2 minutes of the either crashes or works, any idea how I can fix this?

    I will upload my spreadsheet now.

    Thanks for your help.

  4. #4
    Registered User
    Join Date
    10-24-2017
    Location
    Portsmouth, England
    MS-Off Ver
    2013
    Posts
    16

    Re: Sorting issue when using IF statements to pull through data

    Right I think I have uploaded it...

    Focus on the "Starters & Leavers Input" and "Starters and Leavers" tabs.

    So "Starters and Leavers Input" is where I initially add the data, then the Macro copy and pastes as values only on the "Starters and Leavers" tab.

    Try inputting a line on the Input sheet to see the weird thing it does.
    Attached Files Attached Files

  5. #5
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: Sorting issue when using IF statements to pull through data

    Hi,

    How to explain this easiest..?? You have Event Macros in your workbook. These kinds (Event Macros) fire when different things happen with that sheet. Event Macros are behind a single sheet and are supposed to only work on that sheet (there are ways around this). You also try to run a macro that isn't there and this crashes my copy of your workbook.

    Read a few articles first, like:
    http://www.cpearson.com/excel/Events.aspx
    Then put a breakpoint in some of your macros and debug what they are doing by:
    http://www.excel-easy.com/vba/examples/debugging.html

+ 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. MACROS For Sorting Data In One Tab To Pull In Other Tabs
    By spring82 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-10-2017, 01:01 PM
  2. Utilizing IF, THEN Statements to Pull In Data
    By wungfu in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-04-2014, 04:09 PM
  3. Pull data from closed workbook issue
    By mattress58 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-14-2014, 11:59 AM
  4. [SOLVED] Formula with Multiple If Statements to pull in data
    By cartica in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 01-13-2014, 10:48 AM
  5. [SOLVED] Formula or sorting method to pull apart merged data
    By IronCladRooster in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-17-2013, 04:46 PM
  6. Data Sorting Issue
    By petrocksa in forum Excel General
    Replies: 2
    Last Post: 11-12-2010, 03:32 AM
  7. Replies: 1
    Last Post: 03-09-2009, 07:50 AM

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