Right to left counting cells with value until the first empty cell

benntw

Board Regular
Joined
Feb 17, 2014
Messages
222
Office Version
  1. 365
Platform
  1. Windows
I'm looking to count from right to left counting the number of cells with a value until the first empty cell. All cells are formulas. The range is set D:Y. I need to count cells that are greater than 0 until it reaches an empty cell. Can someone help me out with this ?
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
It sounds like "consider the cells between column Y and the first empty cell to the left of that, what number of those cells contain a value > 0"

If that is the question then
=COUNTIF(INDEX(1:1,1,MAX(IF(A1:Y1="",COLUMN(A1:Y1)))):Y1, ">0")
entered with Ctrl-Shift-Enter should do what you want.
 
Upvote 0
My date range is D4:Y4. I have a list of names in column A and a id number in column b. Column C has no value and their days they worked start in column D to Y. I am working backwards from current date to make sure their count of days worked does not exceed 13 straight. I tried the above formula and I am getting a value error. All the cells are populated with a sumif formula on a table if that makes any difference to the formula above.
 
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,205
Members
452,618
Latest member
Tam84

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