How to retrieve a Text field from a many table to a related one table?

General Ledger

Active Member
Joined
Dec 31, 2007
Messages
460
How do I retrieve a Text field from a (many) Sales Detail table to a related (one) Sales Header table?

Invoice number 123 appears once in the Header table but multiple times in the Detail table.
All records for invoice 123 in the Detail table will have the same value for the Text field.

Can I do a VLOOKUP from the Header table to the Detail table?
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
scottsen,

I didn't try this yet but it looks like it should work. I never heard of FIRSTNONBLANK before. I am assuming that the function starts at the top of the records and searches down for the first non-blank value. Therefore, the sort order of the records would impact the value returned. Correct?

G/L
 
Upvote 0
Reading back my answer was almost certainly incomplete, but I would need more details on the specific usage. FIRSTNONBLANK is just a trick to get around the fact that MIN/MAX don't work on Text fields. I was apparently assuming that you would be in the context of just 1 value of the text field.

In general to "lookup" the value in a related table, you just use =RELATED()

How/where you need this? calc column? calc field?
 
Upvote 0

Forum statistics

Threads
1,224,041
Messages
6,176,027
Members
452,697
Latest member
CuriousSpreadsheet

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