lost_in_the_sauce
New Member
 Joined
 Jan 18, 2021
 Messages
 34
 Office Version

 365
 Platform

 Windows
In a workbook that needs to reclass a bunch of journal entries. Each entry, along with monthly spend, has "Category", "sub category," widget color," widget material," etc as you would see in a GL. Trying to write multiple formulas in steps to reclass "location" based on where things actually get booked at a high level. Of 100 "locations, 60 fall into 5 top level ones, then ones that are in a certain "sub category" get reclassed to a different location depending on what their top level one is, and then there is a 3rd reclass for ones that fall in certain states within their top level classification.
For the first column, reclassing to Top Level, I just use something like this =IFERROR(VLOOKUP(A7,'CC Reclass Matrix'!$A$3:$B$88,2,FALSE),A7) where I have a "Reclass Matrix" tab and it looks for the originating location, changes it to the "top" if it falls in one of the 5 categories, and leaves it be if not.
Second column only looks for one specific subcategory, like so =IFERROR(IF(E5=6206,VLOOKUP(B5,'CC Reclass Matrix'!$D$3:$E$6,2,FALSE),B5),B5). New table on the other tab, looks to see if the sub category is 6206, then depending on what the top category now is, changes it, unless it's not one of those 5 then it leaves it alone.
Step 3 I keep doing something wrong. My current thought, because each of the 5 top categories has different (sometimes overlapping) states. If of the 12 locations in top category 1, all originally reclass to 1, location 5 is subcategory 6206 and goes back to location 5. For this 3rd one, I have 6 locations with state designators that need to jump back to their original location, so if location 7 is TX, than any ones with designator22. TX in that column relcasses back to location 7. But only for Top location 1. For the group in top location 20, TX might reclass back to 22.
So, thinking =iferror(if(OR(C2=1,vlookup(C2,"table for location group 1',false)OR(C2=20,vlookup(C2,"table for location 2",2,false.......
Except I'm not great with OR functions, and I'd like for the 3rd reference table to all be one table in case I need to later expand the selection. Doing this the formula way because while I have 5 major location categories and a chunk that doesn't fall in them I'm applying it to 30K GL rows.
For the first column, reclassing to Top Level, I just use something like this =IFERROR(VLOOKUP(A7,'CC Reclass Matrix'!$A$3:$B$88,2,FALSE),A7) where I have a "Reclass Matrix" tab and it looks for the originating location, changes it to the "top" if it falls in one of the 5 categories, and leaves it be if not.
Second column only looks for one specific subcategory, like so =IFERROR(IF(E5=6206,VLOOKUP(B5,'CC Reclass Matrix'!$D$3:$E$6,2,FALSE),B5),B5). New table on the other tab, looks to see if the sub category is 6206, then depending on what the top category now is, changes it, unless it's not one of those 5 then it leaves it alone.
Step 3 I keep doing something wrong. My current thought, because each of the 5 top categories has different (sometimes overlapping) states. If of the 12 locations in top category 1, all originally reclass to 1, location 5 is subcategory 6206 and goes back to location 5. For this 3rd one, I have 6 locations with state designators that need to jump back to their original location, so if location 7 is TX, than any ones with designator22. TX in that column relcasses back to location 7. But only for Top location 1. For the group in top location 20, TX might reclass back to 22.
So, thinking =iferror(if(OR(C2=1,vlookup(C2,"table for location group 1',false)OR(C2=20,vlookup(C2,"table for location 2",2,false.......
Except I'm not great with OR functions, and I'd like for the 3rd reference table to all be one table in case I need to later expand the selection. Doing this the formula way because while I have 5 major location categories and a chunk that doesn't fall in them I'm applying it to 30K GL rows.