VBA Code Help

WarriorKing

New Member
Joined
Mar 8, 2024
Messages
2
Office Version
  1. 2021
Platform
  1. Windows
If somebody could help...

In Columns D and H I have 2 drop down lists and I want Column I to populate with a cost associated to the values in D & H. Would somebody help me with the coding?
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Welcome to the Board!

I think you are missing some critical details.
How is the cost associated with it determined by the values in columns D and H?
Is there some sort of lookup table somewhere you are matching to?
Or is there some sort of formula that uses the values in columns D and H?

Perhaps it would be helpful to show us an example and your expected output.
MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 
Upvote 0
Hi,

Column D has a drop down list of 5 companies
Column H has a drop down list of 4 vendors

What I am looking to do is when Column D has one company populated with a vendor from Column H, I want Column I is populate with the cost associated with the Vendor from Column H. I have a table with associated costs.

I hope this helps...
 
Upvote 0
Hi,

Column D has a drop down list of 5 companies
Column H has a drop down list of 4 vendors

What I am looking to do is when Column D has one company populated with a vendor from Column H, I want Column I is populate with the cost associated with the Vendor from Column H. I have a table with associated costs.

I hope this helps...
You should be able to use an XLOOKUP formula with multiple criteria.
See here for details and examples: XLOOKUP with multiple criteria

If you cannot figure out how to do this from that link, please post exactly what you cost reference table looks like, and let us know exactly what range it exists in.
 
Upvote 0

Forum statistics

Threads
1,215,366
Messages
6,124,514
Members
449,168
Latest member
CheerfulWalker

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