+ Reply to Thread
Results 1 to 3 of 3

Need help with function and date sorting

  1. #1
    Registered User
    Join Date
    10-24-2012
    Location
    Centennial, Colorado
    MS-Off Ver
    Excel 2003
    Posts
    2

    Need help with function and date sorting

    I am tryign to run the following statement in excel:

    =IF(O42="AB",VLOOKUP(WIPCOEI2012!O42,WIPCOEI2012!$O$51:$R$52,3,FALSE),IF(O42="AT",VLOOKUP(WIPCOEI2012!O43,WIPCOEI2012!$O$51:$R$52,3,FALSE)))

    When I cut and paste this row of cells, one of which has the above statement, the "O42" reference will migrate in both the IF statement and VLOOKUP function. When I try to sort multiple highlighted rows, the IF statment O42 reference will change like it is suposed to (depending on where it move to as a result of the sort) but, the VLOOKUP O42 reference will not change. See example when I sort:

    =IF(O45="AB",VLOOKUP(WIPCOEI2012!O42,WIPCOEI2012!$O$51:$R$52,3,FALSE),IF(O42="AT",VLOOKUP(WIPCOEI2012!O43,WIPCOEI2012!$O$51:$R$52,3,FALSE)))


    What is strange to me is that if I manually sort via cut-an-paste method both references change liek they should...

    =IF(O45="AB",VLOOKUP(WIPCOEI2012!O45,WIPCOEI2012!$O$51:$R$52,3,FALSE),IF(O42="AT",VLOOKUP(WIPCOEI2012!O43,WIPCOEI2012!$O$51:$R$52,3,FALSE)))


    What am I doing wrong?

  2. #2
    Forum Expert Moo the Dog's Avatar
    Join Date
    09-28-2012
    Location
    Wisconsin
    MS-Off Ver
    Office 365 (PC & Mac)
    Posts
    1,845

    Re: Need help with function and date sorting

    Instead of O42, use $O$42 if you don't want it to change... then it becomes an absolute reference instead of relative.

    - Moo

  3. #3
    Registered User
    Join Date
    10-24-2012
    Location
    Centennial, Colorado
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Need help with function and date sorting

    The point is that I want it to change and it does not.

+ 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