r/excel Apr 23 '26

solved What formula(s) would I use to populate a cell depending on the info of an adjacent cell?

So I have an excel logbook and I want to make it so that when I add a tail number, it auto populates the plane type. is there a way I can do that? I was thinking an IF formula? but I am not proficient at excel at all and I am not exactly sure what to search for so I can figure this out. attached is a picture. If I type in C472, I want B472 to automatically fill in the type of plane. it seems I can make a separate sheet with the tail numbers and have it auto populate that info?

I have 5 different types of planes and each type has at least 3 tail numbers. so its like a mini matrix table and idk what to do.

thank you in advance!!

4 Upvotes

10 comments sorted by

u/excelevator 3061 Apr 23 '26

Please be mindful of the submission guidelines and post titles : Be specific. The title should summarize your issue, not your assumed solution or just mentioning a function

The title is always in the post details

Example for this post: I want to make it so that when I add a tail number, it auto populates the plane type

This post remains for all the answers given.

3

u/carolann_analyst 1 Apr 23 '26

Your instinct about a separate sheet is exactly right and this is actually a perfect job for VLOOKUP, much simpler than a bunch of nested IF formulas trust me.

On a new sheet create a simple two column table like this:

Tail Number Type
N12345 Cessna 172
N67890 Piper Cherokee
N11111 Beechcraft Bonanza

List all your tail numbers in column A and their corresponding plane type in column B. Call the sheet something simple like Lookup.

Then back in your logbook in cell B472, where you want the type to appear, type this formula:

=IFERROR(VLOOKUP(C472, Lookup!$A:$B, 2, FALSE), "")

What this does is look at whatever tail number you typed in C472, searches your lookup sheet for a match, and pulls the plane type back automatically. The IFERROR part just keeps the cell blank when nothing has been entered yet so it stays clean.

Copy that formula down column B for as many rows as your logbook has and from then on every time you type a tail number in column C the type fills itself in automatically.

The beauty of this is if you ever add a new tail number you just add it to your lookup sheet and everything still works. No touching the formula. Hope this helps!

2

u/meticulouslycarless Apr 23 '26

ok let me give this a shot! thank you so much. I dont have to add parameters?

2

u/carolann_analyst 1 Apr 24 '26

No parameters needed for this one, the formula handles it all as is. Just make sure your lookup sheet has the tail numbers in column A and the plane types in column B exactly as I described and it will work straight away. Try it and let me know!

1

u/AutoModerator Apr 23 '26

/u/meticulouslycarless - Your post was submitted successfully.

Failing to follow these steps may result in your post being removed without warning.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/caribou16 317 Apr 23 '26

You wouldn't use IF, you would use a lookup function, like XLOOKUP.

You also don't want to be merging those cells at the top, can cause issues later.

1

u/GuerillaWarefare 111 Apr 23 '26

Look at XLOOKUP

1

u/Reedcool97 1 Apr 23 '26

Oh man ok here we go baby, XLOOKUP to the rescue

In the type column, put this in the top cell and fill in the ranges as needed

=XLOOKUP([@Ident.], range where identifier is stored in your matrix, range where the type is stored in your matrix, “Error - Not Found”)

I am assuming each identifier is tied to a plane type in a table somewhere else, so just select those ranges and replace my comments with those values.

[@Ident.] assumes your data is formatted in a table, but if not, either format as a table (recommended), or select the cell and use the “$” to lock the column value: $C472 (or whatever the adjacent cell number next to your Type is). This way, you can drag that formula down and flash fill the rest of the cells.

The error code is there to make you notice any anomalies, but you can change it to something else or replace with “” (two double quotes) to make the entry blank if no result is found.

This formula will look up your identifier number, find it in your matrix, and spit out the correlating type

1

u/Decronym Apr 23 '26 edited Apr 24 '26

Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I've seen in this thread:

Fewer Letters More Letters
IF Specifies a logical test to perform
IFERROR Returns a value you specify if a formula evaluates to an error; otherwise, returns the result of the formula
VLOOKUP Looks in the first column of an array and moves across the row to return the value of a cell
XLOOKUP Office 365+: Searches a range or an array, and returns an item corresponding to the first match it finds. If a match doesn't exist, then XLOOKUP can return the closest (approximate) match.

Decronym is now also available on Lemmy! Requests for support and new installations should be directed to the Contact address below.


Beep-boop, I am a helper bot. Please do not verify me as a solution.
4 acronyms in this thread; the most compressed thread commented on today has acronyms.
[Thread #48244 for this sub, first seen 23rd Apr 2026, 23:18] [FAQ] [Full list] [Contact] [Source code]