View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
LoveCandle[_30_] LoveCandle[_30_] is offline
external usenet poster
 
Posts: 1
Default Adding Items To a combo Box


Hi Mr. Bob

After posting my question about the way to get the cells that have data
only in the ComboBox I remembered one way I have used before with the
List feature in Validation property I tried the same way with
ComboBox and it worked perfectly.

My way is using the following formula in the SourceRow instead of the
normal source (A1:A50), and it will give us the cells that have data
only.

A1:INDIRECT(ADDRESS(COUNTIF(A1:A50,"<0"),1))

* The second part of the previous formula give us the address of the
last cell that is not blank.

Remarks: if the list is not in the first column and not starting from
the first row, we can adjust it to be like the following one:

P9:INDIRECT(ADDRESS(COUNTIF(P9:P108,"<0")+8,16))

I hope that everybody benefits from this,

bye,


--
LoveCandle
------------------------------------------------------------------------
LoveCandle's Profile: http://www.excelforum.com/member.php...o&userid=28612
View this thread: http://www.excelforum.com/showthread...hreadid=530403