jeudi 20 mai 2021

Google Sheets Adaptive list?

So first let me explain what I have. I have 1 main sheet and 7 category sheets. Each category sheet has a list of items with its category type on the cell next to it.

like this:

 ___________________
| item1 | Category1 |
| item2 | Category1 |
 ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

I will be adding and deleting items from these lists so I want the main sheet to be adaptive. I am not advanced enough to use app scripts and formulas don't use for loops so is there some work around?

I originally wrote this formula and quickly realized it didn't work due to it changing the cell number to the cell its in.

if(Equips!$A18,Equips!$A18,
   if(Mounts!$A18,Mounts!$A18,
     if(Music!$A18,Music!$A18,
       if(Emotes!$A18,Emotes!$A18,
         if(Minions!$A18,Minions!$A18,
           if(Furniture!$A18,Furniture!$A18,
             if(Misc!$A18,Misc!$A18,
               "Error"
)))))))

I had an idea on how to use for loops to have it count how many cells have data and output that many cells and their data but I forgot it due to getting sleepy at this point. Thank you for your help!

Example to clarify: So say equips has 5 items. The main sheet would display the 5 items. Mounts then has 4 items. On the main sheet underneath the 5 equips the 4 mounts would show up, but say I go to the equips page and add a 6th equip. The main page would update automatically by detecting that the 6th slot in equips sheet contains data and add the 6th equip pushing the 4 mounts down.

Aucun commentaire:

Enregistrer un commentaire