0

I am trying to build a simple connected-tables multi-sheet in Google Sheets, for tracking expenses.

My tables are as follows, and connected by data-validation.

In the column name, I state where I want the data to come from. Either the source is "typed", "by dropdown", or "by link".

expenses

what? (by dropdown from "what?" table) category (by link from what? table) price (by typing)
pizza restaurants (should be auto fed when selecting "pizza"under "what") 4
train transportation (should be auto fed when selecting "train"under "what") 6

what?

name (by typing) category (by drop down from column "name" in catrgories)
pizza restaurants
train transportation

catrgories

name (by typing)
restaurants
transportation

I have everything working except for the "category" column in the expenses table. I want to select a value by drop-down for the "what?" column in the expenses table, and want the value under the "category" column to be fed automatically, from the corresponding cell to that selected, from the "category" column in the what? table.

How can I achieve this?

0

1 Answer 1

0

Ok I got something working, but not sure it is the best practice

The formula for cells under the "price" column in expenses is

=INDEX(whats!B:B, MATCH(B2, whats!A:A), 1)

which means

  1. Find the index of the value specified in the relevant cell (B2 in this example)
  2. Access the second column (B) in the whats table, and obtain the value.

This works, but would love to hear if there's a better way.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.