infinity
04-03-2015, 08:16 AM
Good morning VBA Experts,
I am trying to select a range of cells based on if there is a value in another range of cells. The first thing is, in External ID column I have formula's that return blank through if/and/or statements and I only want to select the range if there is a value in "MPN" which does not have formulas so using Range(Selection, Selection.End(xlDown)).Select will not work because it selects even the cells that have returned <blank> in "External ID" column, this would be a continuous range. T
he second thing I need to do, which is a separate part of the VBA code, I need to select the cells in "External ID" column if there is <blank> in "Recreated Item" column. This would be a non-continuous range because only some items have a value in "Recreated Item" column.
MPN
EXTERNAL ID
Matrix Child?
Recreated Item
PS49051
PS49051-PRI
49051-PRI
PS43211
PS43211-PRI
43211-PRI
40261
40261-PRI
284
284-PRI
285
285-PRI
241
241-PRI
242
242-PRI
PS1175
PS1175-PRI
1175-PRI
PS1176
PS1176-PRI
1176-PRI
PS1193
PS1193-PRI
1193-PRI
PS1184
PS1184-PRI
1184-PRI
PS1185
PS1185-PRI
1185-PRI
PS1186
PS1186-PRI
1186-PRI
PS1244
PS1244-PRI
1244-PRI
I am trying to select a range of cells based on if there is a value in another range of cells. The first thing is, in External ID column I have formula's that return blank through if/and/or statements and I only want to select the range if there is a value in "MPN" which does not have formulas so using Range(Selection, Selection.End(xlDown)).Select will not work because it selects even the cells that have returned <blank> in "External ID" column, this would be a continuous range. T
he second thing I need to do, which is a separate part of the VBA code, I need to select the cells in "External ID" column if there is <blank> in "Recreated Item" column. This would be a non-continuous range because only some items have a value in "Recreated Item" column.
MPN
EXTERNAL ID
Matrix Child?
Recreated Item
PS49051
PS49051-PRI
49051-PRI
PS43211
PS43211-PRI
43211-PRI
40261
40261-PRI
284
284-PRI
285
285-PRI
241
241-PRI
242
242-PRI
PS1175
PS1175-PRI
1175-PRI
PS1176
PS1176-PRI
1176-PRI
PS1193
PS1193-PRI
1193-PRI
PS1184
PS1184-PRI
1184-PRI
PS1185
PS1185-PRI
1185-PRI
PS1186
PS1186-PRI
1186-PRI
PS1244
PS1244-PRI
1244-PRI