Calculator End Of Warranty Date Based on Company Name

mr_ITtoyou

New Member
Joined
Mar 26, 2021
Messages
35
Office Version
  1. 2016
Platform
  1. Windows
We have different companies that offer different amounts of days on their warranty. Company ABC offers 90 days warranty on their products, Company XYZ offers a 730-day on their warranty. How would the formula be setup using the companies name in cell A1, then in cell A2 the purchased date 3/21/21 add 90 days that display the end of warranty date on cell A3?
A1 A2 A3
ABC 3/21/21 6/19/21

B1 B2 B3
XYX 3/21/21 3/21/23
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Hi,

Just add the warranty days to purchase date:

Book3.xlsx
ABCD
1CompanyWarranty DaysPurchase DateWarranty Expires
2ABC903/21/20216/19/2021
3XYZ7303/21/20213/21/2023
Sheet870
Cell Formulas
RangeFormula
D2:D3D2=C2+B2
 
Upvote 0
In case you want it "hard-coded" in the formula, use E2 formula:

Book3.xlsx
ABCDE
1CompanyWarranty DaysPurchase DateWarranty ExpiresOR like this
2ABC903/21/20216/19/20216/19/2021
3XYZ7303/21/20213/21/2023
Sheet870
Cell Formulas
RangeFormula
E2E2=C2+IF(A2="ABC",90,IF(A2="XYZ",730,0))
D2:D3D2=C2+B2
 
Upvote 0
In case you want it "hard-coded" in the formula, use E2 formula:

Book3.xlsx
ABCDE
1CompanyWarranty DaysPurchase DateWarranty ExpiresOR like this
2ABC903/21/20216/19/20216/19/2021
3XYZ7303/21/20213/21/2023
Sheet870
Cell Formulas
RangeFormula
E2E2=C2+IF(A2="ABC",90,IF(A2="XYZ",730,0))
D2:D3D2=C2+B2
Thank you for your help jtakw. Formula-E2 is what I was trying to figure out. That worked great.
E2E2=C2+IF(A2="ABC",90,IF(A2="XYZ",730,0))
 
Upvote 0
You're welcome, thanks for the feedback.

If you have Many Companies in your list, we can switch to a LOOKUP formula with or without a lookup table, rather than a bunch of nested IF(s), let me know.
 
Upvote 0
jtakw, could you show me the formula LOOKUP for a list of companies? Thanks
 
Upvote 0
Please post a "dummy" sample of Companies and their warranty days. Thank You.
 
Upvote 0
Please post a "dummy" sample of Companies and their warranty days. Thank You.
Companies Warranty Days
ACB_________________________60
Star Computer______________120
TV Supply___________________365
Data Supply_________________90
 
Upvote 0
Thanks for the info, here are a few options.

C2 formula uses VLOOKUP with the Table, main advantage over LOOKUP, Table Column G need Not be in Ascending order.
D2 formula uses LOOKUP with the Table, Table Column G Must be in Ascending order.
E2 formula uses LOOKUP Without Table, Values "hard-coded" in formula and Must be in Alpha ascending order. Disadvantage, hard to maintain when adding or changing Company Name and/or Warranty days change.

Advantage with using Table, easier to maintain when adding more companies and/or changing warranty days.

Let me know if you have questions:

Book3.xlsx
ABCDEFGH
1CompanyPurchase DateWarranty ExpiresWarranty ExpiresWarranty ExpiresLookup Table
2ACB3/21/20215/20/20215/20/20215/20/2021ACB60
3TV Supply3/25/20213/25/20223/25/20223/25/2022Data Supply90
4Star Computer12/15/20204/14/20214/14/20214/14/2021Star Computer120
5Data Supply2/3/20215/4/20215/4/20215/4/2021TV Supply365
6TV Supply1/1/20211/1/20221/1/20221/1/2022
7
8^Using Table^Using Table^Hard-coded
9with VLOOKUPwith LOOKUP
Sheet877
Cell Formulas
RangeFormula
C2:C6C2=B2+VLOOKUP(A2,G$2:H$5,2,0)
D2:D6D2=B2+LOOKUP(A2,G$2:G$5,H$2:H$5)
E2:E6E2=B2+LOOKUP(A2,{"ACB","Data Supply","Star Computer","TV Supply"},{60,90,120,365})
 
Upvote 0
Thanks for the info, here are a few options.

C2 formula uses VLOOKUP with the Table, main advantage over LOOKUP, Table Column G need Not be in Ascending order.
D2 formula uses LOOKUP with the Table, Table Column G Must be in Ascending order.
E2 formula uses LOOKUP Without Table, Values "hard-coded" in formula and Must be in Alpha ascending order. Disadvantage, hard to maintain when adding or changing Company Name and/or Warranty days change.

Advantage with using Table, easier to maintain when adding more companies and/or changing warranty days.

Let me know if you have questions:

Book3.xlsx
ABCDEFGH
1CompanyPurchase DateWarranty ExpiresWarranty ExpiresWarranty ExpiresLookup Table
2ACB3/21/20215/20/20215/20/20215/20/2021ACB60
3TV Supply3/25/20213/25/20223/25/20223/25/2022Data Supply90
4Star Computer12/15/20204/14/20214/14/20214/14/2021Star Computer120
5Data Supply2/3/20215/4/20215/4/20215/4/2021TV Supply365
6TV Supply1/1/20211/1/20221/1/20221/1/2022
7
8^Using Table^Using Table^Hard-coded
9with VLOOKUPwith LOOKUP
Sheet877
Cell Formulas
RangeFormula
C2:C6C2=B2+VLOOKUP(A2,G$2:H$5,2,0)
D2:D6D2=B2+LOOKUP(A2,G$2:G$5,H$2:H$5)
E2:E6E2=B2+LOOKUP(A2,{"ACB","Data Supply","Star Computer","TV Supply"},{60,90,120,365})
That you for the huge help. This will help me a lot.
 
Upvote 0

Forum statistics

Threads
1,215,223
Messages
6,123,711
Members
449,118
Latest member
MichealRed

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