Vlookup and hlookup combination

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
32,317
Office Version
365
Platform
Windows
You're welcome & thanks for the feedback
 

leopardhawk

Active Member
Joined
May 31, 2007
Messages
356
Office Version
2016
Platform
Windows
Hi Fluff, I have able to use your formula successfully as a template on a couple of others but on this one, I am getting the error "You've entered too few arguments for this function". The table I am accessing is called OAS_GIS_web and it's shown below the formula that is giving me the error. The amount I am trying to return is in B3 (613.53). I tried it with and without the double quotes around the "Regardless..."

Code:
=INDEX(OAS_GIS_web[Maximum monthly payment amount],MATCH("Regardless of your marital situation"),OAS_GIS_web[Your situation],0))
Book1
ABC
1Your situationMaximum monthly payment amountMaximum annual income to receive the OAS pension Footnote 1
2Old Age Security (OAS) pensionOld Age Security (OAS) pensionOld Age Security (OAS) pension
3Regardless of your marital status613.53$126,058 (individual income)
4Guaranteed Income Supplement (GIS) amounts for individuals receiving a full Old Age Security (OAS) pension.Guaranteed Income Supplement (GIS) amounts for individuals receiving a full Old Age Security (OAS) pension.Guaranteed Income Supplement (GIS) amounts for individuals receiving a full Old Age Security (OAS) pension.
5If you are a single, widowed or divorced pensioner916.38$18,600 (individual income)
6If your spouse/common-law partner receives the full OAS pension551.63$24,576 (combined income)
7If your spouse/common-law partner does not receive an OAS pension916.38$44,592 (combined income)
8If your spouse/common-law partner receives the Allowance551.63$44,592 (combined income)
Sheet2
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
32,317
Office Version
365
Platform
Windows
You've got an extra bracket in there that doesn't belong, you need to remove it
"Regardless of your marital situation"),OAS_GIS_web
 

leopardhawk

Active Member
Joined
May 31, 2007
Messages
356
Office Version
2016
Platform
Windows
I must be getting tired... Thank you SO much! I also realized that I had another typo in the formula... "Regardless of your marital situation" instead of "Regardless of your marital status" Thanks for your guidance and help!
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
32,317
Office Version
365
Platform
Windows
My pleasure
 

leopardhawk

Active Member
Joined
May 31, 2007
Messages
356
Office Version
2016
Platform
Windows
Fluff, hopefully, the last question related to your original formula. In the table below, we have successfully written two formulas that return the amounts that are currently in B3 and B5. I thought it would be easy to combine these two formulas in a SUM formula to add those two amounts together using the same logic, but my attempt at a formula returns $0.00 when it should return $1529.91. Can you help? Thanks!

Code:
=SUM(INDEX(OAS_GIS[Maximum monthly payment amount],MATCH("Regardless of your marital status",OAS_GIS[Your situation],0)),INDEX(OAS_GIS[Maximum monthly payment amount],MATCH("If you are a single, widowed or divorced pensioner",OAS_GIS[Your situation],0)))
Book1
ABC
1Your situationMaximum monthly payment amountMaximum annual income to receive the OAS pension Footnote 1
2Old Age Security (OAS) pensionOld Age Security (OAS) pensionOld Age Security (OAS) pension
3Regardless of your marital status613.53$126,058 (individual income)
4Guaranteed Income Supplement (GIS) amounts for individuals receiving a full Old Age Security (OAS) pension.Guaranteed Income Supplement (GIS) amounts for individuals receiving a full Old Age Security (OAS) pension.Guaranteed Income Supplement (GIS) amounts for individuals receiving a full Old Age Security (OAS) pension.
5If you are a single, widowed or divorced pensioner916.38$18,600 (individual income)
6If your spouse/common-law partner receives the full OAS pension551.63$24,576 (combined income)
7If your spouse/common-law partner does not receive an OAS pension916.38$44,592 (combined income)
8If your spouse/common-law partner receives the Allowance551.63$44,592 (combined income)
Sheet2
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
32,317
Office Version
365
Platform
Windows
That formula looks fine to me. It maybe that the values in col B are text, rather than numbers.
You could try
Code:
=SUM(--INDEX(OAS_GIS[Maximum monthly payment amount],MATCH("Regardless of your marital status",OAS_GIS[Your situation],0)),--INDEX(OAS_GIS[Maximum monthly payment amount],MATCH("If you are a single, widowed or divorced pensioner",OAS_GIS[Your situation],0)))
Note the two - signs before each index
 

leopardhawk

Active Member
Joined
May 31, 2007
Messages
356
Office Version
2016
Platform
Windows
Works perfectly! Why would the two -- make a difference?

Thanks Fluff!
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
32,317
Office Version
365
Platform
Windows
They convert a number stored as text into a number.
 

Forum statistics

Threads
1,082,297
Messages
5,364,372
Members
400,793
Latest member
hamzayagiz

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...
Top