I made a copy of your sheet and and made some modifications. I deleted some tabs that seemed like testing or were redundent, so don’t be to concerned if my copy appears to be missing some things. I just did it to make it easier for me to visualize. I created 3 sheets. ItemUsersInventory (which I assume would go into your Players sheet), ItemChoiceResponses (which list an inventory and total cost of items purchased), and ItemChoices (which is a list of possible items for purchase). What I imagine is either an item displaying somewhere in your app, or a type of store where you select an item from a choice component. Then you would create a form button to purchase the item, with will submit the User and the Item into the ItemChoiceResponses sheet. The cost and image are determined automatically from the item purchases. The ItemUsersInventory sheet performs a series of COUNTIFS and a SUMIF to determine the quantity and the total cost for all items in that users inventory. The total Spent can be used to subtract from the users total gold. I’m not sure if this is exactly what you were looking for, but I think it should get you a lot closer. If an item is no longer available once it purchased, we can make a couple modifications. Right now, there is no limit to how many times an item can be purchased. See what you think of this first.
1 Like