Lookup the first and last column in a range

reacon84

New Member
Joined
Sep 13, 2016
Messages
36
Office Version
  1. 2016
Platform
  1. Windows
Hi all, I'm looking to create a formula that can return the opening or closing balance, depending on the month input. I don't want it to be using the week at all.

For example, in the below image, I have weekly cash balances and I'd like to be able to input the month in the yellow box (ie month 2 in this example) and it returns the opening and closing balances.

Thanks in advance for any help!

1657189790555.png


Week12345678
Month11112222
Opening Balance0150390585950124015601715
Money In200300250400330360200180
Money Out5060553540404535
Closing Balance1503905859501240156017151860
Month:2
Opening Balance950
Closing Balance1860
 

Attachments

  • 1657189654268.png
    1657189654268.png
    17.4 KB · Views: 2

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
How about
Fluff.xlsm
ABCDEFGHI
1Week12345678
2Month11112222
3
4Opening Balance0150390585950124015601715
5Money In200300250400330360200180
6Money Out5060553540404535
7Closing Balance1503905859501240156017151860
8
9Month:2
10Opening Balance950
11Closing Balance1860
Data
Cell Formulas
RangeFormula
B10B10=INDEX(B4:P4,MATCH(B9,B2:P2,0))
B11B11=LOOKUP(2,1/(B2:P2=B9),B7:P7)
 
Upvote 0
Solution
See if these would work for you.

22 07 07.xlsm
ABCDEFGHI
1Week12345678
2Month11112222
3
4Opening Balance0150390585950124015601715
5Money In200300250400330360200180
6Money Out5060553540404535
7Closing Balance1503905859501240156017151860
8
9Month:2
10Opening Balance950
11Closing Balance1860
Balances
Cell Formulas
RangeFormula
B10B10=HLOOKUP(B9,B2:I4,3,0)
B11B11=LOOKUP(B9+0.1,B2:I2,B7:I7)
 
Upvote 0
Oh wow! That was a speedy reply and exactly what I was after!

Thank you so much! :)
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,749
Messages
6,126,656
Members
449,326
Latest member
asp123

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