Mike Guest98
New Member
- Joined
- Jun 4, 2018
- Messages
- 42
I'm been trying to find out what wrong with my code (In sht.Range....) but I don't see it. Can anyone help me?
Thanks so much
<code class="western"> ‘</code><code class="western">Move the cell contents to the next cell</code><code class="western"> </code>
<code class="western"> In sht.Range("E1:E12,B16:B30,E16:E30,H16:H30,K16:K30,N16:N30").Cells</code>
<code class="western"> </code><code class="western">tmp = cell.Offset(0, 1).Value</code>
<code class="western"> </code><code class="western">If cell.Value = n And tmp Like "*#-#*" Then</code>
<code class="western"> </code><code class="western">Cells(irow + 1, icol).Insert Shift:=xlDown</code>
<code class="western"> </code><code class="western"> Cells(irow, icol).Copy Cells(irow + 1, icol)</code>
<code class="western"> </code><code class="western"> Cells(irow, icol).Clear</code> <style type="text/css">pre { direction: ltr; color: rgb(0, 0, 10); text-align: left; }pre.western { font-family: "Liberation Mono", serif; }pre.cjk { font-family: "WenQuanYi Micro Hei Mono"; }pre.ctl { font-family: "Liberation Mono"; }p { margin-bottom: 0.1in; direction: ltr; color: rgb(0, 0, 10); line-height: 115%; text-align: left; }p.western { font-family: "Liberation Serif", serif; font-size: 12pt; }p.cjk { font-family: "WenQuanYi Micro Hei"; font-size: 12pt; }p.ctl { font-family: "Lohit Devanagari"; font-size: 12pt; }code.western { font-family: "Liberation Mono", serif; }code.cjk { font-family: "WenQuanYi Micro Hei Mono"; }code.ctl { font-family: "Liberation Mono"; }</style>
Thanks so much
<code class="western"> ‘</code><code class="western">Move the cell contents to the next cell</code><code class="western"> </code>
<code class="western"> In sht.Range("E1:E12,B16:B30,E16:E30,H16:H30,K16:K30,N16:N30").Cells</code>
<code class="western"> </code><code class="western">tmp = cell.Offset(0, 1).Value</code>
<code class="western"> </code><code class="western">If cell.Value = n And tmp Like "*#-#*" Then</code>
<code class="western"> </code><code class="western">Cells(irow + 1, icol).Insert Shift:=xlDown</code>
<code class="western"> </code><code class="western"> Cells(irow, icol).Copy Cells(irow + 1, icol)</code>
<code class="western"> </code><code class="western"> Cells(irow, icol).Clear</code> <style type="text/css">pre { direction: ltr; color: rgb(0, 0, 10); text-align: left; }pre.western { font-family: "Liberation Mono", serif; }pre.cjk { font-family: "WenQuanYi Micro Hei Mono"; }pre.ctl { font-family: "Liberation Mono"; }p { margin-bottom: 0.1in; direction: ltr; color: rgb(0, 0, 10); line-height: 115%; text-align: left; }p.western { font-family: "Liberation Serif", serif; font-size: 12pt; }p.cjk { font-family: "WenQuanYi Micro Hei"; font-size: 12pt; }p.ctl { font-family: "Lohit Devanagari"; font-size: 12pt; }code.western { font-family: "Liberation Mono", serif; }code.cjk { font-family: "WenQuanYi Micro Hei Mono"; }code.ctl { font-family: "Liberation Mono"; }</style>