Working with blanks in Excel Column E to gnerate action in Column D

eastbiomed

New Member
Joined
Jul 9, 2012
Messages
13
I have a column E that has data in certain cells. The cells that are blank have a formula which looks like this: =IF(ISNA(MATCH(A3,C:C,0)),"",A3). In some cases the answer to the formula leaves a cell blank and in some cases there is a vlaue which is perfectly fine. Is there a VBA script that can be generated where by when ever the value in a cell is blank in column E that it takes action to the cell to the left in Column D. In horrible syntax, I would like a routine to check every cell in column E so that for every blank or null value encountered in Column E it does this action to the cell directly to the left of the blank.
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove

Like I said my VBa syntax is horrible! Thanks!!!
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Try this:
(on a copy please)
Code:
Sub PushDownD()
lr = Cells(Rows.Count, "E").End(xlUp).Row 'last row in column E
For r = 1 To lr
    If Cells(r, "E") = "" Then
        Cells(r, "D").Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
    End If
Next r
End Sub
 
Upvote 0

Forum statistics

Threads
1,215,248
Messages
6,123,866
Members
449,129
Latest member
krishnamadison

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top