+ Reply to Thread
Results 1 to 17 of 17

Sorting is throwing my formulas out of place. Looking for solution.

  1. #1
    Registered User
    Join Date
    01-15-2013
    Location
    USA
    MS-Off Ver
    2010
    Posts
    40

    Question Sorting is throwing my formulas out of place. Looking for solution.

    I have an Excel file with 2 tabs.

    On the first tab, Column A has manager names. Column B has client names. Columns L and onward have formulas pulling numbers from the 2nd tab.

    The problem occurs when I try to sort the data on the 2nd tab. When I choose to sort by Column A and Column B on the 2nd tab, it throws off all the numbers it's pulling on the 1st tab.

    For example, cell L5 on the 1st tab is set up to pull data from cell C4 on the 2nd tab, using the formula ='tab name'!$C$4. And when I re-sort the columns on the 2nd tab, it's now pulling the wrong data onto the 1st tab because the cells are now mis-matched/unaligned as needed.

    My goal is to be able to re-sort both tabs whenever necessary and without throwing off the numbers or having the formulas mismatched.

    Is there any way to do this?
    Attached Files Attached Files
    Last edited by AKM1; 01-22-2013 at 01:25 PM.

  2. #2
    Registered User
    Join Date
    08-28-2012
    Location
    Bangalore
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Sorting is throwing my formulas out of place. Looking for solution.

    Is your data suitable to use a vlookup rather than a direct link to the cell?

  3. #3
    Registered User
    Join Date
    01-15-2013
    Location
    USA
    MS-Off Ver
    2010
    Posts
    40

    Re: Sorting is throwing my formulas out of place. Looking for solution.

    I'd only want to use vlookups as a last resort. Reason being that I am putting this together for another person and I'm not sure that they are familiar with vlookups.

    If that's the only way, though, I'm open to hearing about it.

  4. #4
    Registered User
    Join Date
    08-28-2012
    Location
    Bangalore
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Sorting is throwing my formulas out of place. Looking for solution.

    It is a function that means vertical lookup. We use it to search for a value in the first column of a table array and returns a value in the same row from another column in the table array.
    But for the formula to work error proof, first value of the source table need to be unique.
    If you have a sample worksheet, please share with which I can have a check whether there are any better approaches.

  5. #5
    Registered User
    Join Date
    01-15-2013
    Location
    USA
    MS-Off Ver
    2010
    Posts
    40

    Re: Sorting is throwing my formulas out of place. Looking for solution.

    Okay, I've added a sample file to the original post.

  6. #6
    Registered User
    Join Date
    08-28-2012
    Location
    Bangalore
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Sorting is throwing my formulas out of place. Looking for solution.

    Hi,
    I have attached solution sheet, Please check the 25 Feb data. Formula is as follows. If the Weekly Reoccuring Template sheet gets modified in terms of the number of Clients, then please modify the $B$3:$K$32 part (there are two parts) accordingly.

    Please Login or Register  to view this content.

    Solved_TestFile.xlsx

  7. #7
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: Sorting is throwing my formulas out of place. Looking for solution.

    Ikf aksappy's solution suits you, you can shorten it to

    Please Login or Register  to view this content.
    since you are using 2010

  8. #8
    Registered User
    Join Date
    01-15-2013
    Location
    USA
    MS-Off Ver
    2010
    Posts
    40

    Re: Sorting is throwing my formulas out of place. Looking for solution.

    Thank you very much guys. Would the shortened version also work in 2007 or just in 2010?

    Also, would you mind breaking this formula down to me in layman's terms so I know exactly what it's looking for?
    Last edited by AKM1; 01-23-2013 at 12:24 PM.

  9. #9
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: Sorting is throwing my formulas out of place. Looking for solution.

    I think it works for both 2007 and 2010 ( not 2003 where one needs to use aksappy's solution)

    Try using the " Evaluate formula" tool to see the formula at work

  10. #10
    Registered User
    Join Date
    01-15-2013
    Location
    USA
    MS-Off Ver
    2010
    Posts
    40

    Re: Sorting is throwing my formulas out of place. Looking for solution.

    I tried to use the evaluate formula tool, but it didn't seem to explain much.

    Any-who, is there a way for me to copy the formula across cells so I don't have to do each cell manually? When I right-click and drag the formula across the entire section, it copies the exact same formula instead of going up by 1 each time.

    Also, one other thing I just noticed is that in my original file, cells BS9, BT9, and BU9 were all blank, but in your copy, those cells were filled in with 8, 8, and 10 accordingly. This appears to be an error.
    Last edited by AKM1; 01-23-2013 at 06:05 PM.

  11. #11
    Registered User
    Join Date
    01-15-2013
    Location
    USA
    MS-Off Ver
    2010
    Posts
    40

    Re: Sorting is throwing my formulas out of place. Looking for solution.

    Please if someone could help me figure out why the error occurred just in those cells and how to fix it, I'd be very appreciative. I'm so close yet so far away from having this work.

  12. #12
    Registered User
    Join Date
    01-15-2013
    Location
    USA
    MS-Off Ver
    2010
    Posts
    40

    Re: Sorting is throwing my formulas out of place. Looking for solution.

    Can anyone help please?

  13. #13
    Registered User
    Join Date
    08-28-2012
    Location
    Bangalore
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Sorting is throwing my formulas out of place. Looking for solution.

    Usually in a formula, if you put a cell reference without a dollar prefix, it would keep on changing whenever you drag or copy it to other cells. For eg:-

    giving $B$4, always points to B4 whether you drag it or not
    giving $B4, would change the cell reference index upon dragging. Like $B5, $B6 etc.
    giving B4, that this value can change when dragged depending on the direction that you are dragging. B4, C4 etc.

    If giving a range (say B4:B100, where there are not dollars prefixed), dragging the formula would change the entire range. B4:B100 becomes B5:B101 etc.

    Does this help you? If still in trouble,

  14. #14
    Registered User
    Join Date
    01-15-2013
    Location
    USA
    MS-Off Ver
    2010
    Posts
    40

    Re: Sorting is throwing my formulas out of place. Looking for solution.

    The thing is that your solution file worked for the most part, the only problem was that it wasn't pulling the correct information into cells BS9, BT9, and BU9. They were all blank in the original version, but in your copy, those cells were filled in with 8, 8, and 10 accordingly. If I can just find a solution to this problem, it will work perfectly.

  15. #15
    Registered User
    Join Date
    01-15-2013
    Location
    USA
    MS-Off Ver
    2010
    Posts
    40

    Re: Sorting is throwing my formulas out of place. Looking for solution.

    Doesn't anyone know how to fix this? It's so close to working, I'd hate to think that I can't use it just because of a small error.

  16. #16
    Registered User
    Join Date
    01-15-2013
    Location
    USA
    MS-Off Ver
    2010
    Posts
    40

    Re: Sorting is throwing my formulas out of place. Looking for solution.

    Well I guess I'll give this one last try before giving up. If anyone can help resolve the error in the file from aksappy, please let me know.

    Thank you!

  17. #17
    Registered User
    Join Date
    01-15-2013
    Location
    USA
    MS-Off Ver
    2010
    Posts
    40

    Re: Sorting is throwing my formulas out of place. Looking for solution.

    Well, thanks anyways guys. I guess we can consider this request abandoned.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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