Product If Formula for Two Columns based on Current Month

Excellent022

New Member
Joined
May 15, 2020
Messages
12
Office Version
  1. 365
Platform
  1. Windows
Hello,
I'm struggling to write the formula that would multiply two cells in two different columns based on one of the columns having a header that matches my reference cell. Below is a basic outline of what I'm trying to do. My reference cell is D1 with a formula that returns the current month. I need a formula for E3 that will search for the May column, then multiply C3 by D3. Any help with this? I tried a Product If formula but got hung up. Thank you!

A B C D E

1 May

2 January February May Cost Total

3 1 3 5 100

4 2 4 6 200
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Apologies, the data formatting got weird.
A B C D E
1 M
2 J F M C T
3 1 2 3 100
4 4 5 6 200
 
Upvote 0
Upload a screenshot of your data is a better way.
工作簿1
ABCDE
1May
2January FebruaryMayCost Total
3235100500
42462001200
Sheet1
Cell Formulas
RangeFormula
E3:E4E3=INDEX(A3:C3,MATCH(D$1,A$2:C$2,))*D3
 
Upvote 0
Upload a screenshot of your data is a better way.
工作簿1
ABCDE
1May
2January FebruaryMayCost Total
3235100500
42462001200
Sheet1
Cell Formulas
RangeFormula
E3:E4E3=INDEX(A3:C3,MATCH(D$1,A$2:C$2,))*D3
Thank you for letting me know. I tried the formula and it brought back #N/A. Here's the snippit of my actual spreadsheet. Did I do something incorrect?
 

Attachments

  • excel.jpg
    excel.jpg
    44.2 KB · Views: 4
Upvote 0
you miss something, you missed "," for MATCH, the last parameter.
=INDEX(A3:C3,MATCH(D$1,A$2:C$2,))*D3
 
Upvote 0
thanks for you feedback and have ha nice weekend?
 
Upvote 0

Forum statistics

Threads
1,214,947
Messages
6,122,411
Members
449,081
Latest member
JAMES KECULAH

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