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!!!
 

Some videos you may like

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest

drsarao

Well-known Member
Joined
Sep 9, 2009
Messages
1,143
Office Version
  1. 2007
Platform
  1. Windows
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
 

Watch MrExcel Video

Forum statistics

Threads
1,123,045
Messages
5,599,488
Members
414,313
Latest member
Oonagh123

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
Top