Adding Data by Row based on typing in cell contained in Row

dkurschner

New Member
Joined
Feb 25, 2009
Messages
3
Hi All! I am BRAND NEW to this board and my Excel skills are quite marginal compared to the Think Tank on this great message board. I have an ongoing project that has many questions I'd like to pose. I will only start with one question and hopefully you guys/gals are willing to help me "learn how to fish" a little bit better.

As seems to come up fairly often in Excel message forums, I've built (but not completed) a spreadsheet used to organize multiple Bill of Material lists. This list is a row-by row list of products with information relating to a specific part number including: Mfg, Part#, Qty Used, Cost Ea, Vendor, among many more.

Here's what I'm trying to accomplish first. As this list grows, my intension is the be able to recall a row of data (or control what columns of the row are recalled) from this list and be able to easily add them to the list. I would like to be able to do this by typing in data in one cell in the row (like the Part#), and then have a macro or VB code that will automatically fill in a defined number of columns with the descriptive data like: Mfg, Cost Ea, Vendor, etc.

Currently, the data for the rows (if it already exists) would reside higher up in the list on the same worksheet but could also potentially be on another tab in the workbook.

Is this a daunting task or is it do-able for a excel user without any VBA or much macro experience? Your help would be greatly appreciated .
 
Last edited:

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Hello..

It'll be helpful if you could provide some sample data.
From what I understand your data would look something like this.

Excel Workbook
ABCDE
1MfgPart #Qty UsedCost EaVendor
2ABCDPart 12100Vendor 1
3EFGHPart 24152Vendor 2
4XYZAPart 31410Vendor 3
5DEFGPart 45584Vendor 2
Sheet1
Excel Workbook
ABCDE
9Part #MfgQty UsedCost EaVendor
10Part 4DEFG5584Vendor 2
Sheet1



I think the formulae give should do the job...
 
Upvote 0
Sandeep - This is a great formula for starters but I'm experiencing a problem. If I have numbers stored as text in the indexed column, the formula doesn't seem to work. Is there a way around this? Thanks for your help so far!
 
Upvote 0
I tried changing some of the sample data to numbers in text format and I didnt get any error. What problem do you exactly face?

Do you get a #Value or #N/A or something like that. If yes, could you select the cell containing the formula and go to Tools-> Formula Auditing -> Evaluate Formula and check where exactly the error occurs.

I also noticed something else, you need to have similar formatting in the cells containing the lookup value & the lookup table.

Since in the example given, you are using Part# as your lookup value, the format for Part# in both tables should be the same. So if it is number formatted as text in one table, it should be number formatted as text in the second table too. I think this is why you are facing the error.

Regards,
Sandeep.
 
Upvote 0
I stand corrected...I get the "#N/A" whenever there is a blank cell involved or if the item I type is has not been entered into the list yet. I've got about 7 columns as a test using your formula which works well so far. But it would be nice to find a way to eliminate the error message on the blank ones.

Continuing down this same path of thought, If we were to take this one step further, is there a way to incorporate and IF/THEN or AND type of formula where if I type in a Part#, the formula could also reference another column's cell in the same row (like CUSTOMER [not shown on your example] for example and return a value that is specific to the CUSTOMER AND the PART#. To clarify, my list may have some columns that has data that changes depending on the Customer Column when using the same Part#.

I'll post a sample of my sheet if it helps tomorrow as I've got to get some Zzz's. I'll keep monitoring this thread. I really appreciate the help.
 
Upvote 0
Hello,

To overcome the error part you could use IF(ISERROR( syntax. I have used the same in the formulae below.

For your 2nd question, if possible, add a column at the end which concatenates Part# & Customer.

Excel Workbook
ABCDEFG
1MfgPart #Qty UsedCost EaVendorCustomerNew Col
2ABCDPart 12100Vendor 1Cust 1Part 1Cust 1
3EFGHPart 24152Vendor 2Cust 2Part 2Cust 2
4XYZAPart 11410Vendor 3Cust 3Part 1Cust 3
5JKLMPart 45584Vendor 2Cust 4Part 4Cust 4
Sheet1
Excel Workbook
ABCDEF
9Part #CustomerMfgQty UsedCost EaVendor
10Part 1Cust 3XYZA1410Vendor 3
Sheet1



What the IF(ISERROR( does is it executes the formula & if the value returned is an error like #Value or #N/A, it will say "Value not Present". If no error is returned, the formula would give the required values.

Hope this solves your query..

Regards,
Sandeep.
 
Upvote 0

Forum statistics

Threads
1,214,622
Messages
6,120,576
Members
448,972
Latest member
Shantanu2024

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