Hi everyone
hopefully this is a simple one but my limited VBA experience has me stumped. I want to clear the contents of columns a and b when a is blank. Below is the table of sample data i want to clear cells a4:b7, however this range need to be dynamic based off if column A is blank and b contains something. [TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]a[/TD]
[TD]b[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]1011111[/TD]
[TD]500
[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]1011157[/TD]
[TD]500[/TD]
[/TR]
[TR]
[TD]3
[/TD]
[TD]1010257[/TD]
[TD]500[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD][/TD]
[TD]500[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD][/TD]
[TD]500
[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD][/TD]
[TD]500[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD][/TD]
[TD]500[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
hopefully this is a simple one but my limited VBA experience has me stumped. I want to clear the contents of columns a and b when a is blank. Below is the table of sample data i want to clear cells a4:b7, however this range need to be dynamic based off if column A is blank and b contains something. [TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]a[/TD]
[TD]b[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]1011111[/TD]
[TD]500
[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]1011157[/TD]
[TD]500[/TD]
[/TR]
[TR]
[TD]3
[/TD]
[TD]1010257[/TD]
[TD]500[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD][/TD]
[TD]500[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD][/TD]
[TD]500
[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD][/TD]
[TD]500[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD][/TD]
[TD]500[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]