ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Report within a row the Last used ColumnNr minus ForeLast Used ColumnNr (https://www.excelbanter.com/excel-programming/454426-report-within-row-last-used-columnnr-minus-forelast-used-columnnr.html)

JS SL

Report within a row the Last used ColumnNr minus ForeLast Used ColumnNr
 
Hello,

New challange :).

I tried to figure it out with Index/Match formula, but........ :(

Better (?) to solve with a macro. So if there's a solution.... Thx!


In column H (=8) I need to report the last used column with data, within the same row, within the range of column I (=9) till AP (=42) minus the ForeLast used column with data.

For example;
Column AA (=27) has data "xx"
Column AL (=38) has data "xxx"
Column AO (=41) has data "xxxx"

Then reporting in the specific row in column H - 41-38= 3

because LastUsedColumn = 41 and ForeLastUsedColumn = 38.
Then reporting 41-38=3

regards, Johan

Claus Busch

Report within a row the Last used ColumnNr minus ForeLast Used ColumnNr
 
Hi Johan,

Am Wed, 11 Sep 2019 11:17:15 -0700 (PDT) schrieb JS SL:

In column H (=8) I need to report the last used column with data, within the same row, within the range of column I (=9) till AP (=42) minus the ForeLast used column with data.

For example;
Column AA (=27) has data "xx"
Column AL (=38) has data "xxx"
Column AO (=41) has data "xxxx"

Then reporting in the specific row in column H - 41-38= 3


try:
=MAX((I1:AP1<"")*COLUMN(I:AP))-LARGE(IF(I1:AP1<"",COLUMN(I:AP)),2)
and insert that formula with CTRL+Shift+Enter


Regards
Claus B.
--
Windows10
Office 2016

JS SL

Report within a row the Last used ColumnNr minus ForeLast Used ColumnNr
 
Claus,

SuperThanks. Works as wished (as usual)
Also thx for youre quick respons on it.
:)

regards, Johan



All times are GMT +1. The time now is 01:04 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com