VLookup for table with varying rows.

ssmith3156

New Member
Joined
Apr 11, 2023
Messages
15
Office Version
  1. 365
Platform
  1. Windows
I have this VLOOKUP for Table3, =IFERROR(VLOOKUP([@Concatenate],'COST TYPE SUMMARY'!$G$2:$H$35,2,FALSE),"0.00"). The rows will vary each month, so I need the formula to auto-populate the new cells when they are added. Is there a way to modify this formula to make that happen?
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
There are two ways of doing this. Create a Dynamic named range or turn your Cost Type Summary range into an Excel Table.

Dynamic named range that I named CostType_Tbl:
=OFFSET('Cost Type Summary'!$G$1,1,0,MATCH("zzzzzzzzzzz",'Cost Type Summary'!$G:$G,1)-ROW('Cost Type Summary'!$G$1),2)
Use it like:
=IFERROR(VLOOKUP([@Concatenate],CostType_Tbl,2,FALSE),"0.00")
Managing this requires no extra input from you. This assumes that column G is text based data.

Excel Table named CostTypeTbl
Use it Like:
=IFERROR(VLOOKUP([@Concatenate],CostTypeTbl,2,FALSE),"0.00")
Managing this requires that you resize the table if extra data is added or rows are removed. Sometimes the table will resize larger, but not smaller
 
Upvote 0
There are two ways of doing this. Create a Dynamic named range or turn your Cost Type Summary range into an Excel Table.
Neither of those worked for me. But, it could be because I'm still a novice at tables. I have attached screenshots of my original sheets. If you don't mind taking a look, I would greatly appreciate it. Table1 is on another tab (Cost Type Summary). The VLookup formula is in the Rate column of Table3.
 

Attachments

  • Table3.png
    Table3.png
    88.7 KB · Views: 20
  • Table1.png
    Table1.png
    50.8 KB · Views: 12
Upvote 0
As you can see, I named my table CostTypeTbl and your table name is Table1. So you're either going to have to change your formula so it looks a Table1 or change your table name to CostTypeTbl.
 
Upvote 0
As you can see, I named my table CostTypeTbl and your table name is Table1. So you're either going to have to change your formula so it looks a Table1 or change your table name to CostTypeTbl.
This is my original. When I tested the codes you gave me, I did change the table names to match, but it did not work for newly added rows without me manually dragging a cell with the formula to the new rows.
 
Upvote 0
As you can see, I named my table CostTypeTbl and your table name is Table1. So you're either going to have to change your formula so it looks a Table1 or change your table name to CostTypeTbl.
Thank you for your help. I was able to solve this by going a different route.
 
Upvote 0

Forum statistics

Threads
1,223,247
Messages
6,171,007
Members
452,374
Latest member
keccles

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