Hi
Can someone please advise what the quickest way of checking if a range of cells eg A1:Y1 is empty, using VBA, please?
I found this code online, but I'm not sure how to modify it....?
<tbody style="box-sizing: border-box; border: 0px !important; margin: 0px !important; padding: 0px !important; outline: 0px !important; background: none !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; line-height: 1.1em !important; font-size: 1em !important; direction: ltr !important;">
[TD="class: content"]<code class="keyword" style="box-sizing: border-box; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; background: none !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; line-height: 1.1em !important; font-weight: bold !important; direction: ltr !important; display: inline !important; color: rgb(0, 102, 153) !important;">If</code> <code class="plain" style="box-sizing: border-box; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; background: none !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; line-height: 1.1em !important; direction: ltr !important; display: inline !important;">IsEmpty(Cell) </code><code class="keyword" style="box-sizing: border-box; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; background: none !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; line-height: 1.1em !important; font-weight: bold !important; direction: ltr !important; display: inline !important; color: rgb(0, 102, 153) !important;">Then</code>[/TD]
</tbody>
<tbody style="box-sizing: border-box; border: 0px !important; margin: 0px !important; padding: 0px !important; outline: 0px !important; background: none !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; line-height: 1.1em !important; font-size: 1em !important; direction: ltr !important;">
[TD="class: number"]<code style="box-sizing: border-box; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; margin: 0px !important; padding: 0px 0.3em 0px 0px !important; border: 0px !important; outline: 0px !important; background: none !important; text-align: right !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: 2.7em !important; line-height: 1.1em !important; direction: ltr !important; display: block !important;">2</code>[/TD]
[TD="class: content"]<code class="spaces" style="box-sizing: border-box; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; background: none !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; line-height: 1.1em !important; direction: ltr !important; display: inline !important;"> </code><code class="plain" style="box-sizing: border-box; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; background: none !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; line-height: 1.1em !important; direction: ltr !important; display: inline !important;">StatementsIfCellIsEmpty</code>[/TD]
</tbody>
<tbody style="box-sizing: border-box; border: 0px !important; margin: 0px !important; padding: 0px !important; outline: 0px !important; background: none !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; line-height: 1.1em !important; font-size: 1em !important; direction: ltr !important;">
[TD="class: number"]<code style="box-sizing: border-box; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; margin: 0px !important; padding: 0px 0.3em 0px 0px !important; border: 0px !important; outline: 0px !important; background: none !important; text-align: right !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: 2.7em !important; line-height: 1.1em !important; direction: ltr !important; display: block !important;">3</code>[/TD]
[TD="class: content"]<code class="keyword" style="box-sizing: border-box; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; background: none !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; line-height: 1.1em !important; font-weight: bold !important; direction: ltr !important; display: inline !important; color: rgb(0, 102, 153) !important;">Else</code>[/TD]
</tbody>
<tbody style="box-sizing: border-box; border: 0px !important; margin: 0px !important; padding: 0px !important; outline: 0px !important; background: none !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; line-height: 1.1em !important; font-size: 1em !important; direction: ltr !important;">
[TD="class: number"]<code style="box-sizing: border-box; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; margin: 0px !important; padding: 0px 0.3em 0px 0px !important; border: 0px !important; outline: 0px !important; background: none !important; text-align: right !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: 2.7em !important; line-height: 1.1em !important; direction: ltr !important; display: block !important;">4</code>[/TD]
[TD="class: content"]<code class="spaces" style="box-sizing: border-box; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; background: none !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; line-height: 1.1em !important; direction: ltr !important; display: inline !important;"> </code><code class="plain" style="box-sizing: border-box; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; background: none !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; line-height: 1.1em !important; direction: ltr !important; display: inline !important;">StatementsIfCellIsNotEmpty</code>[/TD]
</tbody>
<tbody style="box-sizing: border-box; border: 0px !important; margin: 0px !important; padding: 0px !important; outline: 0px !important; background: none !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; line-height: 1.1em !important; font-size: 1em !important; direction: ltr !important;">
[TD="class: number"]<code style="box-sizing: border-box; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; margin: 0px !important; padding: 0px 0.3em 0px 0px !important; border: 0px !important; outline: 0px !important; background: none !important; text-align: right !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: 2.7em !important; line-height: 1.1em !important; direction: ltr !important; display: block !important;">5</code>[/TD]
[TD="class: content"]<code class="keyword" style="box-sizing: border-box; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; background: none !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; line-height: 1.1em !important; font-weight: bold !important; direction: ltr !important; display: inline !important; color: rgb(0, 102, 153) !important;">End</code> <code class="keyword" style="box-sizing: border-box; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; background: none !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; line-height: 1.1em !important; font-weight: bold !important; direction: ltr !important; display: inline !important; color: rgb(0, 102, 153) !important;">If</code>[/TD]
</tbody>
TIA
Can someone please advise what the quickest way of checking if a range of cells eg A1:Y1 is empty, using VBA, please?
I found this code online, but I'm not sure how to modify it....?
<tbody style="box-sizing: border-box; border: 0px !important; margin: 0px !important; padding: 0px !important; outline: 0px !important; background: none !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; line-height: 1.1em !important; font-size: 1em !important; direction: ltr !important;">
[TD="class: content"]<code class="keyword" style="box-sizing: border-box; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; background: none !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; line-height: 1.1em !important; font-weight: bold !important; direction: ltr !important; display: inline !important; color: rgb(0, 102, 153) !important;">If</code> <code class="plain" style="box-sizing: border-box; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; background: none !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; line-height: 1.1em !important; direction: ltr !important; display: inline !important;">IsEmpty(Cell) </code><code class="keyword" style="box-sizing: border-box; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; background: none !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; line-height: 1.1em !important; font-weight: bold !important; direction: ltr !important; display: inline !important; color: rgb(0, 102, 153) !important;">Then</code>[/TD]
</tbody>
<tbody style="box-sizing: border-box; border: 0px !important; margin: 0px !important; padding: 0px !important; outline: 0px !important; background: none !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; line-height: 1.1em !important; font-size: 1em !important; direction: ltr !important;">
[TD="class: number"]<code style="box-sizing: border-box; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; margin: 0px !important; padding: 0px 0.3em 0px 0px !important; border: 0px !important; outline: 0px !important; background: none !important; text-align: right !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: 2.7em !important; line-height: 1.1em !important; direction: ltr !important; display: block !important;">2</code>[/TD]
[TD="class: content"]<code class="spaces" style="box-sizing: border-box; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; background: none !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; line-height: 1.1em !important; direction: ltr !important; display: inline !important;"> </code><code class="plain" style="box-sizing: border-box; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; background: none !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; line-height: 1.1em !important; direction: ltr !important; display: inline !important;">StatementsIfCellIsEmpty</code>[/TD]
</tbody>
<tbody style="box-sizing: border-box; border: 0px !important; margin: 0px !important; padding: 0px !important; outline: 0px !important; background: none !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; line-height: 1.1em !important; font-size: 1em !important; direction: ltr !important;">
[TD="class: number"]<code style="box-sizing: border-box; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; margin: 0px !important; padding: 0px 0.3em 0px 0px !important; border: 0px !important; outline: 0px !important; background: none !important; text-align: right !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: 2.7em !important; line-height: 1.1em !important; direction: ltr !important; display: block !important;">3</code>[/TD]
[TD="class: content"]<code class="keyword" style="box-sizing: border-box; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; background: none !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; line-height: 1.1em !important; font-weight: bold !important; direction: ltr !important; display: inline !important; color: rgb(0, 102, 153) !important;">Else</code>[/TD]
</tbody>
<tbody style="box-sizing: border-box; border: 0px !important; margin: 0px !important; padding: 0px !important; outline: 0px !important; background: none !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; line-height: 1.1em !important; font-size: 1em !important; direction: ltr !important;">
[TD="class: number"]<code style="box-sizing: border-box; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; margin: 0px !important; padding: 0px 0.3em 0px 0px !important; border: 0px !important; outline: 0px !important; background: none !important; text-align: right !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: 2.7em !important; line-height: 1.1em !important; direction: ltr !important; display: block !important;">4</code>[/TD]
[TD="class: content"]<code class="spaces" style="box-sizing: border-box; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; background: none !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; line-height: 1.1em !important; direction: ltr !important; display: inline !important;"> </code><code class="plain" style="box-sizing: border-box; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; background: none !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; line-height: 1.1em !important; direction: ltr !important; display: inline !important;">StatementsIfCellIsNotEmpty</code>[/TD]
</tbody>
<tbody style="box-sizing: border-box; border: 0px !important; margin: 0px !important; padding: 0px !important; outline: 0px !important; background: none !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; line-height: 1.1em !important; font-size: 1em !important; direction: ltr !important;">
[TD="class: number"]<code style="box-sizing: border-box; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; margin: 0px !important; padding: 0px 0.3em 0px 0px !important; border: 0px !important; outline: 0px !important; background: none !important; text-align: right !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: 2.7em !important; line-height: 1.1em !important; direction: ltr !important; display: block !important;">5</code>[/TD]
[TD="class: content"]<code class="keyword" style="box-sizing: border-box; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; background: none !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; line-height: 1.1em !important; font-weight: bold !important; direction: ltr !important; display: inline !important; color: rgb(0, 102, 153) !important;">End</code> <code class="keyword" style="box-sizing: border-box; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; background: none !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; line-height: 1.1em !important; font-weight: bold !important; direction: ltr !important; display: inline !important; color: rgb(0, 102, 153) !important;">If</code>[/TD]
</tbody>
TIA