Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9632

In Google Spreadsheets how to make a relative column reference within a query?

$
0
0

I'm working with a large data set surrounding about 200 countries at the moment for a school project. As such, I'm using a query formula to transfer raw data to a computed form to be graphed later. Right now I'm using this query formula (where Raw_data is a named range on a different tab):

=query(Raw_data, "SELECT (A/("&A2&"/10000000)) where (A>0)")

This works fine by itself. However, when dragged to successive columns I manually have to change A to B, etc. twice. If anyone knows how to use a relative column reference it would be greatly appreciated. What I mean by that is if I drag the above query to the right I'd like it to output something along the lines of:

=query(Raw_data, "SELECT (B/("&B2&"/10000000)) where (B>0)")

Viewing all articles
Browse latest Browse all 9632

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>