largeselection
Active Member
- Joined
- Aug 4, 2008
- Messages
- 358
Hi,
I'd like to define a range and include only the entries that have a certain code in the cell next to them.
So my data looks like this:
A B C D E
4 x
3 y
2 x
1 y
5 x
So I need to define a range in vba and have the range be equal to the collection of cells in column A that have an "x" as their value in column B.
So my range would be ("A1", "A3", and "A5")
How can I put this into vba to say set the range = all cells where column B's value is "x", but offset (0,-1).
That would be a HUGE time saver and help!
Thanks
I'd like to define a range and include only the entries that have a certain code in the cell next to them.
So my data looks like this:
A B C D E
4 x
3 y
2 x
1 y
5 x
So I need to define a range in vba and have the range be equal to the collection of cells in column A that have an "x" as their value in column B.
So my range would be ("A1", "A3", and "A5")
How can I put this into vba to say set the range = all cells where column B's value is "x", but offset (0,-1).
That would be a HUGE time saver and help!
Thanks