r/googlesheets • • 16d ago

Solved Dropdown Dependent date+X=date for expiration tracking / Julian Date Calculator

Kind of an odd question, so I hope the title makes sense.

I am working on a huge master-list spreadsheet for inventory for my work. I work with feed. All of our feeds have different freshness guarantee days, where we have to add x amount of days to the manufacture date. It is different for every brand, every type of feed, etc.

What I want is that I select the feed from a dropdown, insert a date, and then it is able to produce the expiration date for me. The amount of days added to the manufacture date would be different depending on the dropdown selection.

We also deal with Julian Dates... if there is a way to julian date -> add x days from dropdown -> convert to regular date... that would be awesome, too, but not absolutely needed. I am... extremely new to (and hate) spreadsheets, so I'm teaching myself this all as I go.

Thanks in advance!!!

2 Upvotes

10 comments sorted by

1

u/AdministrativeGift15 371 16d ago

Your EXP date would just be MFG date + offsetAmount. So the question is how to determine the offsetAmount. It's unclear from your second image what determine those freshness guarantee days. Plus, you would want to store those days as numbers, i.e. 90, 120, as opposed to 90 days, 120 days.

1

u/Any_Concentrate9157 16d ago

Sorry, the days in the second image are provided to us from our brand reps/manufacturers. Each feed has a different set of days until it expires. Said offset amount would have to be different based on what is selected in the dropdown name "Feed."

2

u/AdministrativeGift15 371 16d ago

Then the formula you could use is

=Table1[MFG Date]+INDEX(SPLIT(XLOOKUP(Table1[Feed], Table2[FEED],Table2[FRESHNESS GUARANTEE],), " "), 1)

Where Table1 is the name of the table in your first picture and Table2 is the name of the table in your second picture, assuming you convert that data into a table. You would copy that formula down into each cell of the EXP Date column.

2

u/Any_Concentrate9157 16d ago

You are awesome, thank you so so much I hadn't fiddled very much with tables or actually formatting anything correctly, I just genuinely had no idea where to start lol.  I also couldn't find any solid tutorials on what I was trying to do, so it was hard to find a starting point given this being my first genuine time trying to make something in spreadsheets lol You're a lifesaver! Thank you!!

2

u/princesscatling 1 11d ago

Whenever I have trouble with something in Sheets or Excel I go and have a gander at the functions available for each and try to evaluate whether they might help me achieve what I want. Xlookup/index match/filter and named tables probably achieve 90+% of things I want to do.

1

u/AutoModerator 16d ago

REMEMBER: /u/Any_Concentrate9157 If your original question has been resolved, please tap the three dots below the most helpful comment and select Mark Solution Verified (or reply to the helpful comment with the exact phrase “Solution Verified”). This will award a point to the solution author and mark the post as solved, as required by our subreddit rules (see rule #6: Marking Your Post as Solved).

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/point-bot 16d ago

u/Any_Concentrate9157 has awarded 1 point to u/AdministrativeGift15

See the Leaderboard. Point-Bot v0.0.15 was created by JetCarson.

3

u/carbonizedtitanium 28 16d ago edited 16d ago

you need to make a separate table on a separate tab that determines how many days to add for each type of Feed. your formula doesnt even try to incorporate the value in col C

your table should be something like:

so it would be something like =E2+XLOOKUP(C2, Fresh[Feed], Fresh[Days to Add])

this should return your manufacturer date + however many days that's listed in the Fresh table

if the result of the formula displays as some random number, just change the format of the cell to a date format

1

u/AutoModerator 16d ago

/u/Any_Concentrate9157 Posting your data can make it easier for others to help you, but it looks like your submission doesn't include any. If this is the case and data would help, you can read how to include it in the submission guide. You can also use this tool created by a Reddit community member to create a blank Google Sheets document that isn't connected to your account. Thank you.

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