I only want to grab specific cells
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? |
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? |
All times are GMT +1. The time now is 01:26 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com