How Do I Find The Cells With Contiguous Data In A Row In Excel VBA? -


Looking at the image ... if I know the range ("B3") . How can I get cells with cell E3 related cells? Since F3 should not be considered since the empty G3. The result can be either a range object (B3: E3) or counting of cells (in this case 4).

Setting B3 as active cell and doing.

  range (activate, activale.ind (xltorite) .count  < / Pre> 

I get the count, although this method is not reliable, until the data is stored in B3, it is counted until cells end up the sheet. Of course, it is obtained by looping through the cells But I want to use a worksheet function or some other efficient method

It seems that the number of consecutive columns in a row starting with cell B3 Trying to determine.

The code given below is $ B $ 3: $ E $ 3 and 4. Depending on your data, if the data is only in cell B3, then $ B $ 3 and 1 will return.


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -