excel formula need

ravindra1962

New Member
Joined
Jan 21, 2017
Messages
19
Office Version
  1. 2007
Platform
  1. Windows
MONTH OPTEDFromtoBasic Pay
Nov-19​
01-07-201931-07-2019
51230​
01-08-2019​
31-08-2019
51230​
01-09-201930-09-2019
51230​
01-10-2019​
31-10-2019
51230​
01-11-2019​
30-11-2019
52590​
01-12-2019​
31-12-2019
52590​
01-01-2020​
31-01-2020
52590​
01-02-2020​
29-02-2020
52590​
01-03-2020​
31-03-2020
52590​
01-04-2020​
30-04-2020
52590​
IF I HAVE OPTED FOR NOVEMBER 2019
FROMTOTOTAL
MONTHS
BASIC PAY
01.07.201931.10.20194 MONTHS
51230​
01.11.201930.04.20196 MONTHS
52590​
I NEED FORMULA IN EXCEL IN THE ABOVE COLUMNS PLEASE
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Hi Ravindra1962

Your To range of "30.04.2019" appears to be a typo.

Excel will not handle partial date entries so if you type "NOV-19" into a cell it will interpret that incorrectly, e.g. as 19 November 2021. You could force entry as a text field and then use a formula to build a date, but it would be easiest if you just entered the date of the 1st day of the month and year you want to check.

You don't say how the Basic Pay in your results should be calculated so I've assumed it's an average.

I note all ranges are single and complete months and so the formula assumes same.

Ravindra1962.xlsx
ABCDEFGHIJ
1MONTH OPTEDFromtoBasic PayFROMTOTOTAL MONTHSBASIC PAY
201-Nov-1901-Jul-1931-Jul-1951230MONTHSBASIC PAY
301-Aug-1931-Aug-195123001-Jul-1931-Oct-19451230
401-Sep-1930-Sep-195123001-Nov-1930-Apr-20652590
501-Oct-1931-Oct-1951230
601-Nov-1930-Nov-1952590
701-Dec-1931-Dec-1952590
801-Jan-2031-Jan-2052590
901-Feb-2029-Feb-2052590
1001-Mar-2031-Mar-2052590
1101-Apr-2030-Apr-2052590
Sheet1
Cell Formulas
RangeFormula
G3G3=MIN($B$2:$B$9999)
H3H3=A2-1
I3I3=COUNTIF($B$2:$B$9999,"<"&$A$2)
J3J3=SUMIFS($D$2:$D$9999,$D$2:$D$9999,">0",$B$2:$B$9999,"<"&$A$2)/I3
G4G4=A2
H4H4=MAX($C$2:$C$9999)
I4I4=COUNTIF($B$2:$B$9999,">="&$A$2)
J4J4=SUMIFS($D$2:$D$9999,$D$2:$D$9999,">0",$B$2:$B$9999,">="&$A$2)/I4
 
Upvote 0
COLUMN J3 SHOWS WRONGLY INSTEAD OF 51230
 

Attachments

  • Capture.JPG
    Capture.JPG
    120.7 KB · Views: 8
Upvote 0
COLUMN J3 SHOWS WRONGLY INSTEAD OF 51230
 

Attachments

  • Capture.JPG
    Capture.JPG
    120.7 KB · Views: 6
Upvote 0
You need to start from row D2 and B2. I believe you are starting from D3 and B3.
 
Upvote 0
Then I suspect one of the date or pay fields is text instead on numeric.
 
Upvote 0

Forum statistics

Threads
1,215,506
Messages
6,125,189
Members
449,213
Latest member
Kirbito

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