Offset? Match? Lookup? Something else?

bigmyk2k

Board Regular
Joined
Feb 9, 2012
Messages
104
I am trying to find an indirect reference function.
Example:

I want to autopopulate cell B3 with a lookup value.
That value is found in Array "Data", on a separate sheet.
B3 looks at B1 for a date, finds that date in "Data" and returns the value X Rows down, and Y rows over.
X and Y are found through a VLookup at another array.

This seems straightforward, but I can't figure out how to do it.
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
This function does everything I want it to- that is, it produces all the exact results in every step, but Excel doesn't like it for some unspecified reason.
(Note: Cell and array references aren't exactly as specified in the intro)

=OFFSET(VLOOKUP(Analysis!B5,'Data - RG 3'!$A$12:$A$50000,1),VLOOKUP(Analysis!B10,Offset,2,False),VLOOKUP(Analysis!B10,Offset,3,false))
 
Upvote 0
Hi

It appears that the 2nd and 3rd VLOOKUPS refer to a named range "Offset". It is not advisable to used Reserved Words as named ranges.

hth
 
Upvote 0
I agree. Sorry, I had changed that shortly after posting, and didn't update (for some reason I don't have the option to edit my previous posts).

Excel remains cranky.

Currentest version:
=OFFSET(VLOOKUP(Analysis!B5,'Data - RG 3'!$A$12:$A$50000,1),VLOOKUP(Analysis!B10,Dur_Off,2,False),VLOOKUP(Analysis!B10,Dur_Off,3,false))
 
Upvote 0
You need to provide a sample of your data using either one of the routines in my signature or one of the file sharing sites (neutralizing any sensitive data).

I think you also need to clarify your objectives since I cannot relate the formula to the OP.
 
Upvote 0
You need to provide a sample of your data

Here you go. This is as simple as I can make it and still hopefully get the point across. The formula showing up in A12 should be in (and populating B8).
Thanks for your help!

Example

*ABCDEFGHIJKLM
1Rainfall AnalysisRG Site 1******DurationOffset
Rows
Offset Columns**
2Start of Precipitation Period4/12/14 9:00 PM******5-DAY48013**
3End of Precipitation Period4/14/14 12:30 PM******72-HR28812**
4Total System Precipitation0.00******48-HR19211**
5Storm Analysis*******24-HR9610**
6Significant Period Start Time*******18-HR729**
7Significant Period Duration24-HR******12-HR488**
8Significant Period Total*******6-HR247**
9********3-HR126**
10********2-HR85**
11********1-HR44**
12=IF(ISBLANK(B6),"",OFFSET(VLOOKUP(B6,A16:M60,1),VLOOKUP(B7,I2:K13,2,False),VLOOKUP(B7,I2:K13,3,false)))*******30-MIN23**
13********15-MIN12**
14**SUMMATION OF DURATION TOTALS
15TimeRainfall (IN)30-MIN1-HR2-HR3-HR6-HR12-HR18-HR24-HR48-HR72-HR5-DAY
1604/12/2014 10:45 PM0.030.030.260.290.290.290.290.290.290.290.290.29
1704/12/2014 11:00 PM0.020.050.100.280.310.310.310.310.310.310.310.31
1804/12/2014 11:15 PM0.010.030.060.290.320.320.320.320.320.320.320.32
1904/12/2014 11:30 PM0.010.020.070.300.330.330.330.330.330.330.330.33
2004/12/2014 11:45 PM0.020.030.060.320.350.350.350.350.350.350.350.35
2104/13/2014 12:00 AM0.010.030.050.150.330.360.360.360.360.360.360.36
2204/13/2014 12:15 AM0.000.010.040.100.330.360.360.360.360.360.360.36
2304/13/2014 12:30 AM0.020.020.050.120.350.380.380.380.380.380.380.38
2404/13/2014 12:45 AM0.010.030.040.100.360.390.390.390.390.390.390.39
2504/13/2014 1:00 AM0.020.030.050.100.200.410.410.410.410.410.410.41
2604/13/2014 1:15 AM0.000.020.050.090.150.410.410.410.410.410.410.41
2704/13/2014 1:30 AM0.000.000.030.080.150.410.410.410.410.410.410.41
2804/13/2014 1:45 AM0.010.010.030.070.130.420.420.420.420.420.420.42
2904/13/2014 2:00 AM0.000.010.010.060.110.420.420.420.420.420.420.42
3004/13/2014 2:15 AM0.000.000.010.060.100.420.420.420.420.420.420.42
3104/13/2014 2:30 AM0.000.000.010.040.090.420.420.420.420.420.420.42
3204/13/2014 2:45 AM0.000.000.000.030.070.420.420.420.420.420.420.42
3304/13/2014 3:00 AM0.000.000.000.010.060.390.420.420.420.420.420.42
3404/13/2014 3:15 AM0.010.010.010.020.070.400.430.430.430.430.430.43
3504/13/2014 3:30 AM0.000.010.010.020.050.400.430.430.430.430.430.43
3604/13/2014 3:45 AM0.000.000.010.010.040.400.430.430.430.430.430.43
3704/13/2014 4:00 AM0.040.040.050.050.060.260.470.470.470.470.470.47
3804/13/2014 4:15 AM0.010.050.050.060.070.220.480.480.480.480.480.48

<colgroup><col style="font-weight:bold; width:30px; "><col style="width:168px;"><col style="width:111px;"><col style="width:74px;"><col style="width:74px;"><col style="width:74px;"><col style="width:80px;"><col style="width:49px;"><col style="width:77px;"><col style="width:61px;"><col style="width:47px;"><col style="width:62px;"><col style="width:45px;"><col style="width:63px;"></colgroup><tbody>
</tbody>

Spreadsheet Formulas
CellFormula
B4=SUMIFS('[20150605_Revised Rainfall Analysis - RHO.xlsx]Data - RG 3'!$B$12:$B$50000,'[20150605_Revised Rainfall Analysis - RHO.xlsx]Data - RG 3'!$A$12:$A$50000,">="&'[20150605_Revised Rainfall Analysis - RHO.xlsx]Analysis'!B3,'[20150605_Revised Rainfall Analysis - RHO.xlsx]Data - RG 3'!$A$12:$A$50000,"<"&'[20150605_Revised Rainfall Analysis - RHO.xlsx]Analysis'!B4)

<tbody>
</tbody>

<tbody>
</tbody>


Excel tables to the web >> Excel Jeanie HTML 4
 
Upvote 0
What do you expect from this part of the formula VLOOKUP(B6,A16:M60,1)

B6 seems to contain asterisk!

For Offset that part of the formula should be giving you an address which you offset by 96 rows and 10 columns.

What address should you be offsetting?
 
Upvote 0
Yes, using Excel Jeanie, it fills in blank cells with an Asterisk.
The point of that is to find a user input date and time (entered in cell B6) in the called out array (A16:M60). Then, the latter parts or the formula are to return the value found the appropriate number of rows down and columns across (found by the next two lookups) from that cell.
Yes, I know that this lookup won't work with nothing entered in B6 (technically, working correctly would return a blank cell), but Excel won't accept the formula at all, saying that there is an error.
 
Upvote 0
If the user entered 04/13/2014 4:00 AM would you expect B8 to be populated with the contents of J37 or some other cell?
 
Upvote 0
If the user entered 04/13/2014 4:00 AM would you expect B8 to be populated with the contents of J37 or some other cell?

You're ~75% right.

Working through the formula:
=IF(ISBLANK(B6),"", OFFSET( VLOOKUP(B6,A16:M60,1), VLOOKUP(B7,I2:K13,2,False), VLOOKUP(B7,I2:K13,3,false)))

=IF(ISBLANK(B6),"", OFFSET(Cell A37),VLOOKUP(B7,I2:K13,2,False),VLOOKUP(B7,I2:K13,3,false)))

=IF(ISBLANK(B6),"", OFFSET(Cell A37), VLOOKUP("24-HR",I2:K13,2,False), VLOOKUP(B7,I2:K13,3,false)))

=IF(ISBLANK(B6),"", OFFSET(Cell A37), 96, VLOOKUP(B7,I2:K13,3,false)))

=IF(ISBLANK(B6),"", OFFSET(Cell A37),96, VLOOKUP("24-HR",I2:K13,3,false)))

=IF(ISBLANK(B6),"", OFFSET(Cell A37),96,10)

So, (assuming that
04/13/2014 4:00 AM is entered in B6) I want to find the value in the cell 96 rows down, and 10 columns over from Cell A37, aka- J133. (Which is not pasted in the example, for the sake of space.)

This process all makes sense to me, but Excel doesn't like that formula, and tells me there is an error in it.
 
Upvote 0

Forum statistics

Threads
1,203,127
Messages
6,053,663
Members
444,676
Latest member
locapoca

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top