I want to lookup a string that can fall anywhere in a table from A1:J100 and return the value in the cell below it.
For example, find the text "January" from A1:J100 and if it falls in cell D10, give me the value in D11
I want to lookup a string that can fall anywhere in a table from A1:J100 and return the value in the cell below it.
For example, find the text "January" from A1:J100 and if it falls in cell D10, give me the value in D11
Well, if you are OK with making a function in VB try this:
1) Make this function:
2)![]()
Option Explicit Function returnOffset(whatFind As String, whereLook As Range, offRow As Long, offCol As Long) As Variant returnOffset = whereLook.Find(whatFind).Offset(offRow, offCol).Value End Function
Call it in the sheet, like this: =returnOffset("JANUARY",A1:J100,1,0)
That should do it
Remember, saying thanks only takes a second or two. Click the star icon(*) below the post you liked, to give some Rep if you think an answer deserves it.
Please,mark your thread [SOLVED] if you received your answer.
What is the data type of the value to be returned? Is it text? Numeric? Could be both? Something else?
Biff
Microsoft MVP Excel
Keep It Simple Stupid
Let's Go Pens. We Want The Cup.
Thank you GeneralDisarray - I'm trying to stay away from VBA for simplicity of other users of this spreadsheet.
Tony - it could be both, but it'll likely be a a date and a number. Could you explain the impact of both on your solution?
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks