I’m working with a Google Sheets document where I need to create a formula in column B that pulls data based on values from column A. Specifically, I want to use the GOOGLEFINANCE function in cell B2 that references the stock symbol from cell A2.
The challenge is that I have around 100 rows of data, and I don’t want to manually type each stock symbol into the formula. Instead, I need the formula to automatically grab the symbol from the cell directly to its left.
For example, if A2 contains “AAPL”, then B2 should have a formula like: =GOOGLEFINANCE(A2, "price")
But I want to understand the general principle of how to reference the adjacent cell so I can apply this to other similar situations. What’s the correct way to structure this type of relative cell reference?
What you want is relative cell referencing - it’s way simpler than it sounds. When you write A2 without dollar signs, Google Sheets automatically adjusts it based on where the cell is. I’ve done this tons of times with financial data. Just put =GOOGLEFINANCE(A2, “price”) in B2, copy it with Ctrl+C, then select B2:B101 and paste with Ctrl+V. Each formula will automatically grab the right row from column A. Works the same way with VLOOKUP, INDEX, or any other function. The trick is skipping the $ symbols - that’s what makes references shift when you copy them.
yup, just use =GOOGLEFINANCE(A2, “price”) in B2 and drag it down. it will change to A3 in B3, A4 in B4 automatically. that’s the beauty of relative references in sheets, real time saver!
You’re already on the right track with relative cell referencing. When you write =GOOGLEFINANCE(A2, “price”) in B2, Google Sheets automatically treats A2 as relative. Copy that formula down to B3 and it’ll adjust to A3, then A4, and so on. Just enter the formula in B2, then drag the fill handle down to row 101. Or copy B2 and paste it across the range B2:B101. Google Sheets handles all the adjustments automatically. This works the same way for any function that references adjacent cells - the relative positioning stays intact when you copy formulas around.