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

TIfinance

New Member
Joined
Dec 30, 2014
Messages
4
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!
 

Some videos you may like

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

Mick Peters

Board Regular
Joined
May 18, 2015
Messages
93
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:

Watch MrExcel Video

Forum statistics

Threads
1,122,473
Messages
5,596,356
Members
414,061
Latest member
JJSB

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
Top