If/Then (For Rows in Column A containing year, multiply corresponding cells in Column C)

TIfinance

New Member
Joined
Dec 30, 2014
Messages
6
I'd like to perform the product function for cells in the rows that contain the year 2016. I tried the following code but it just returns FALSE. My thinking: if the year of the date in column A contains "2016", then multiply the corresponding cells in column A for these rows. Any suggestions?


Code:
=IF(ISNUMBER(SEARCH(2016,YEAR(A25:A336))),(PRODUCT(C$25:C$336+1)-1),"FALSE")

Thanks!
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Not quite sure what you are trying to achieve with this but having broken the formula apart the fault seems to lay in that the Year() function only works on a single cell,

Code:
=IF(ISNUMBER(SEARCH(2016,YEAR(A1))),(PRODUCT(C$1:C$336+1)-1),"FALSE")

This said the product function then only has 1 value to work on. Depending on how large the range is you could either use other cells for your calculations. So a set of cells that work out the result of the corresponding C column to the A column and then use Product to do your calculation on those cells.

Code:
=IF(ISNUMBER(SEARCH(2016,YEAR(A1))),C1,0)

I hope this helps
If not please post some further detail.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,808
Messages
6,121,684
Members
449,048
Latest member
81jamesacct

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