Forum Discussion

RussellRinehart's avatar
RussellRinehart
Copper Contributor
Aug 17, 2023
Solved

More than 64 Nested Levels - Need to Simplify if Possible

I am attempting to create a formula that will pull from 124 lines of data so that when I type a number in, the corresponding information from the next 4 columns is pulled automatically. I got it to work, but it takes 124 levels of nesting which of course is not possible. Is there a way around this? Here are a few lines of my code. It basically follows this from numbers 1-124. I essentially want to create a formula that I can drag down however many lines, and whatever number I put in the C column, columns D through H will autopopulate with the information from Sheet 3

=IF(C7=1,Sheet3!$B$1:$F$1,(IF(C7=2,Sheet3!$B$2:$F$2,(IF(C7=3,Sheet3!$B$3:$F$3,(IF(C7=4,Sheet3!$B$4:$F$4,(IF(C7=5,Sheet3!$B$5:$F$5)

    • RussellRinehart's avatar
      RussellRinehart
      Copper Contributor

      Patrick2788 this is good to know, unfortunately I am trying to make it so that whatever value I type in C7, that corresponding row is imported from the other sheet. I'm not totally sure if what I want to do is possible, but I got it to work with 1-64 using the formula I had. I'll keep digging around though and messing with it. Thanks! 

      • Patrick2788's avatar
        Patrick2788
        Silver Contributor
        That's what the CHOOSEROWS formula is designed to do. Did you try the sample workbook provided?

Resources