Reputation: 1
I am trying to consolidate a master sheet of student's scholarships within Google Sheets. The master sheet is comprised of pulling data from student's individual scholarship entry spreadsheets. In this master we are trying to pull data of total scholarship money awarded by year. More specifically we are trying to display the University Name Year and total scholarship awarded so ideally the formula should return "University 2020: [$ Amount]".
To display this what we have done is use the following formula (College Budget tab would be the tab we are pulling data from):
=importrange(https://docs.google.com/spreadsheets/d/1zBQdMvTHf6jtju_UkX2fp30z4lv5nL4J1-O_6OzWovk/edit#gid=0,("College Budget!c3"))&": "&importrange($C6,("College Budget!c8"))
From the above code, it resulted in the cell displaying: University 2020: 2000. However, when dragging this across the row for the next 3 cells (representing the following 3 years of college), the formula displays the same result as the first cell.
Is there an additional function I could use to make the cell display the following row values (e.g. "University 2021: [$$$ Amount]", "University 2022: [$$$ Amount[, etc.)?
I've provided a link below to a dummy spreadsheet where the above code is referencing. Appreciate the help!
https://docs.google.com/spreadsheets/d/1zBQdMvTHf6jtju_UkX2fp30z4lv5nL4J1-O_6OzWovk/edit#gid=0
Upvotes: 0
Views: 631
Reputation: 1
you dont need to drag it. you can do:
=QUERY(QUERY(IMPORTRANGE(
"1nfAyNQnsAaRLzFUKaVdL9H2X32oy7pgRb3IIJi89f5s", "College Budget!B3:F"),
"select Col2,Col3,Col4,Col5
where Col1 = 'Total'", 1),,9^9)
and from there you just add :
=INDEX(REGEXREPLACE(QUERY(QUERY(IMPORTRANGE(
"1nfAyNQnsAaRLzFUKaVdL9H2X32oy7pgRb3IIJi89f5s", "College Budget!B3:F"),
"select Col2,Col3,Col4,Col5
where Col1 = 'Total'", 1),,9^9), " ([^ ]+)$", ": $1"))
Upvotes: 1