Link to home
Start Free TrialLog in
Avatar of Smilesxl
Smilesxl

asked on

Excel Macro - Return looks up a column to find lower number.

Spreadsheet has "Level"  in column A, "Part #" in column B, in column C is "Next Level Part #" and is what I need to populate.

Usually there is a level 1, that is the highest and it will have in the next rows, all of it's level 2 parts and some level 3's and 4's.   Essentially I need a column that shows the next level up the part number in that row.  So if it is a level 4 part, I need the level 3 part to be populated in the "Next Level Part #" row.   So essentially I need it to look at the level of the row it is in, then look above to the next lower number, and return the "Part #" of that row.    

Hope someone can help.  I used to do this stuff, but have not even looked at Excel in 5 years.  (I know luck me, right).   But I have forgotten most of what I used to know.  It is not like riding a bike.
ASKER CERTIFIED SOLUTION
Avatar of Ejgil Hedegaard
Ejgil Hedegaard
Flag of Denmark image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Smilesxl
Smilesxl

ASKER

I am not sure how to call a custom function?  I type in =NextLevelPartNumber (range?).  Never mind, I got it, thanks.
Thank you so much!  Great solution.