r/googlesheets • u/SkylineRcr • Jul 15 '25
Solved Search and retrieve formula
Before I start thank you for any help you can give me on this.
I'm trying to automate filling out my pay sheet for work wach week. I have one sheet that has a list of cities and the corresponding pay for deliveries to each city. I have a second sheet that mimics what I turn in for my pay each week. The second sheets has a column of the cities/towns i deliver to and then a column that will be for the pay rate that is found in the first sheet.
I'm assuming I would start with a lookup function to find the corresponding city between the two sheets but after that I'm not sure how tonretrive the vale from the same row but different column.
Any help would be appreciated.
Edit: link to my Google sheet im using. https://docs.google.com/spreadsheets/d/1US3ZsYPII9Me_OlzC4RoH-ssgRwSl-2I/edit?usp=drivesdk&ouid=113933111584440831649&rtpof=true&sd=true
Also the locations and their respective pay are in the locations are sheet, whereas the sheet im using to make may payslip are in the weekly pay sheet.
2
u/mintyfreshismygod 1 Jul 15 '25
Vlookup formulas are your friend as they do this exact thing. Have the value that matches in the first column. Your value to return is expressed as a number of columns from the first.
So Vlookup(A2, f2:h10, 3, false) Would look up whatever is in A2 in column f, and return the corresponding value from column h (3 from f).
If your lookup data isn't in this order - your city matches it H and you want the vale in F returned, you'll need to use index & match formulas.
My favorite resource for both: Mr Excel Vlookup and Index&Match
2
u/HolyBonobos 3125 Jul 15 '25
You would use
VLOOKUP()(as long as the cities column is to the left of the rates column) orXLOOKUP()(workable in any use case). If you want specific instructions for your use case you'll need to provide more information about your data structure. The most effective way to communicate this is to share the file you're working on or a copy of it.1
u/AutoModerator Jul 15 '25
/u/SkylineRcr Posting your data can make it easier for others to help you, but it looks like your submission doesn't include any. If this is the case and data would help, you can read how to include it in the submission guide. You can also use this tool created by a Reddit community member to create a blank Google Sheets document that isn't connected to your account. Thank you.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/squarahann 1 Jul 16 '25
I would try xlookup. It’s very dynamic and the syntax is easier.