Vlookup, if then function, iserror function

hannah epic

New Member
Joined
Feb 14, 2016
Messages
1
Hi there,

I am trying to create a function which does the following:

In Spreadsheet "2016" column "Destroy" I would like to put: if [product code (which is found in spreadsheet "data 2") is AB (which is found in spreadsheet "data 2" on the same row but a few columns over) then the Destroy cell in spreadsheet "2016" should be the Expiry date (found in "2016", same row as destroy cell but column to the left) + 365 days. If the product code is not AB, but CD, then the Destroy cell in "2016" should equal the Expiry date cell.

Does this make sense? I've tried using VLOOKUP, the IF THEN function and an ISERROR function but I can't work it out. I'm not very good with excel to begin with. Can anyone help me out?

Thanks,

Hannah
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Hi Hannah epic,

Here is something to get your started; however, I believe it might be easier if there was a little more context (or screen shots, or something) to go on . . .

=IFERROR(IF(VLOOKUP(PRODUCT CODE,'data 2'!A1:F26,NUMBER OF COLUMNS OVER TO GET TO AB/CD COLUMN,0)="AB",EXPIRATION DATE CELL+365,IF(VLOOKUP(PRODUCT CODE,'data 2'!A1:F26,NUMBER OF COLUMNS OVER TO GET TO AB/CD COLUMN,0)="CD",EXPIRATION DATE CELL,"Error")),"NOT FOUND")

I have typed in a number of descriptions, such as "PRODUCT CODE", in which you need to enter the specific cell references. Also, the range in the VLOOKUP needs to change (shown as 'data 2'!A1:F26 above), but this is the bones of your formula.

Hope this helps.
 
Upvote 0

Forum statistics

Threads
1,223,234
Messages
6,170,891
Members
452,366
Latest member
TePunaBloke

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