Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am working with a large sheet and I need to create a macro that looks to
see if there is a value in a cell Column G. If said cell is not null then I need to have it delete the information in the corresponding cell in Column F. I am a novice with excel and any help would be outstanding. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
if Cells(YourRowNumberHere,"G").value < "" then
'if you want to clear contents do this Cells(YourRowNumberHere,"F").ClearContents 'if you want to delete it and shift data up do this Cells(YourRowNumberHere,"F").Delete shift:=xlUp end if HTH Die_Another_Day ALoecher wrote: I am working with a large sheet and I need to create a macro that looks to see if there is a value in a cell Column G. If said cell is not null then I need to have it delete the information in the corresponding cell in Column F. I am a novice with excel and any help would be outstanding. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
do the cells contain constant values. If they don't are they empty (the
cells you don't want to take action on). Dim rng as Range On Error Resume Next set rng = columns("G").SpecialCells(xlConstants) On Error goto 0 if not rng is Nothing then set rng = Intersect(columns("F"),rng.EntireRow) rng.ClearContents End if -- Regards, Tom Ogilvy "ALoecher" wrote: I am working with a large sheet and I need to create a macro that looks to see if there is a value in a cell Column G. If said cell is not null then I need to have it delete the information in the corresponding cell in Column F. I am a novice with excel and any help would be outstanding. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2007 Macro/VB Question DDE Question | Excel Worksheet Functions | |||
Macro Question | Excel Discussion (Misc queries) | |||
question about the macro vb some one help? | Excel Programming | |||
MACRO QUESTION | Excel Programming | |||
macro question | Excel Programming |