View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default I only want to grab specific cells

Right now your loop stops when column B equals "Null". How is it supposed
to tell when to end now?

--
Regards,
Tom Ogilvy

"Gary Phillips" wrote in message
...
Okay, I've got an Excel document throws a list of items into a listbox. It

grabs that item list from another sheet. Here's how it does that:

Range("B1").Select
While ActiveCell.Value < ""
test2 = ActiveCell.Value
Sheet1.comboShowReports.AddItem test2
Cells(ActiveCell.Row + 1, 2).Select
Wend

It basically loops down through the list until it reaches an empty cell.

Easy enough... Except now I want it to loop through based on an additional
piece of information. I want it to grab everything whose value equals null
in the B column AND whose value equals "ShowReports" in the C column.

How would I go about doing that?