Count Zeros in cells before first number

kgkev

Well-known Member
Joined
Jun 24, 2008
Messages
1,291
Office Version
  1. 365
Platform
  1. Windows
In Q6-AD6 I have stock usage for a particular item

Q6 is 2011
R6 is 2010
.
.
AD6 is 1998

I would like to add a column to "last Used"

So if my data looks like

0,0,0,0,0,6,1,4,0,0,5,10,4,6

I can say that it was last used in 2006

Alternatively I can have it output last used 5 Years ago.
 

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
In Q6-AD6 I have stock usage for a particular item

Q6 is 2011
R6 is 2010
.
.
AD6 is 1998

I would like to add a column to "last Used"

So if my data looks like

0,0,0,0,0,6,1,4,0,0,5,10,4,6

I can say that it was last used in 2006

Alternatively I can have it output last used 5 Years ago.
Here's another one...

Let's assume this data is in the range Q7:AD7...

0,0,0,0,0,6,1,4,0,0,5,10,4,6

Array entered**:

=INDEX(Q6:AD6,MATCH(1,IF(Q7:AD7>0,1),0))

** array formulas need to be entered using the key combination of CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT key then hit ENTER.
 
Upvote 0

Forum statistics

Threads
1,225,156
Messages
6,183,242
Members
453,152
Latest member
ChrisMd

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