Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Delete rows if AF and AY empty but F has information
I am looking for help getting a macro that works and performs the following
steps. Check Column F for information If Column F has information check Column AF and AY for information If Column AF and AY are empty delete the rows. Can you help? |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
SOLVED Delete rows if AF and AY empty but F has information
Please disregard this post. I posted in wrong section.
"Louie" wrote: I am looking for help getting a macro that works and performs the following steps. Check Column F for information If Column F has information check Column AF and AY for information If Column AF and AY are empty delete the rows. Can you help? |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Delete rows if AF and AY empty but F has information
Sub deleterows()
Dim iLastRow As Long Dim i As Long iLastRow = Cells(Rows.Count, "F").End(xlUp).Row For i = iLastRow To 1 Step -1 If Cells(i, "F").Value < "" Then If Application.CountA(Range(Cells(i, "AF"), _ Cells(i, "AY"))) = 0 Then Rows(i).Delete End If End If Next i End Sub Gord Dibben MS Excel MVP On Thu, 4 Mar 2010 10:13:01 -0800, Louie wrote: I am looking for help getting a macro that works and performs the following steps. Check Column F for information If Column F has information check Column AF and AY for information If Column AF and AY are empty delete the rows. Can you help? |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
SOLVED Delete rows if AF and AY empty but F has information
Too late Louie.
Gord Dibben MS Excel MVP On Thu, 4 Mar 2010 10:48:01 -0800, Louie wrote: Please disregard this post. I posted in wrong section. "Louie" wrote: I am looking for help getting a macro that works and performs the following steps. Check Column F for information If Column F has information check Column AF and AY for information If Column AF and AY are empty delete the rows. Can you help? |
#5
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Delete rows if AF and AY empty but F has information
Hi Gord thanks for the help. Its not working completely. Any thoughts?
Also, I am not sure if you saw my earlier post regarding this question. After I realized I posted this question in the worksheet section, I left a message to ignore this post, and I reposted in the programming section. The title is 'Info in F but AF and/or AY no info so delete the..' but the question is the same. My name is Louie, if you search by that display name you will see the other post. Please reply wherever is more convenient for you. Thanks again for your help. "Gord Dibben" wrote: Sub deleterows() Dim iLastRow As Long Dim i As Long iLastRow = Cells(Rows.Count, "F").End(xlUp).Row For i = iLastRow To 1 Step -1 If Cells(i, "F").Value < "" Then If Application.CountA(Range(Cells(i, "AF"), _ Cells(i, "AY"))) = 0 Then Rows(i).Delete End If End If Next i End Sub Gord Dibben MS Excel MVP On Thu, 4 Mar 2010 10:13:01 -0800, Louie wrote: I am looking for help getting a macro that works and performs the following steps. Check Column F for information If Column F has information check Column AF and AY for information If Column AF and AY are empty delete the rows. Can you help? . |
#6
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Delete rows if AF and AY empty but F has information
Miscommunication on my part. That's why its not working. Sorry Gord, i am
looking for "and/or", just ignore this post completely. My apologies. "Louie" wrote: Hi Gord thanks for the help. Its not working completely. Any thoughts? Also, I am not sure if you saw my earlier post regarding this question. After I realized I posted this question in the worksheet section, I left a message to ignore this post, and I reposted in the programming section. The title is 'Info in F but AF and/or AY no info so delete the..' but the question is the same. My name is Louie, if you search by that display name you will see the other post. Please reply wherever is more convenient for you. Thanks again for your help. "Gord Dibben" wrote: Sub deleterows() Dim iLastRow As Long Dim i As Long iLastRow = Cells(Rows.Count, "F").End(xlUp).Row For i = iLastRow To 1 Step -1 If Cells(i, "F").Value < "" Then If Application.CountA(Range(Cells(i, "AF"), _ Cells(i, "AY"))) = 0 Then Rows(i).Delete End If End If Next i End Sub Gord Dibben MS Excel MVP On Thu, 4 Mar 2010 10:13:01 -0800, Louie wrote: I am looking for help getting a macro that works and performs the following steps. Check Column F for information If Column F has information check Column AF and AY for information If Column AF and AY are empty delete the rows. Can you help? . |
#7
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Delete rows if AF and AY empty but F has information
Change the = 0 to < 2
If Application.CountA(Range(Cells(i, "AF"), _ Cells(i, "AY"))) = 0 Then Gord On Thu, 4 Mar 2010 12:39:02 -0800, Louie wrote: Hi Gord thanks for the help. Its not working completely. Any thoughts? Also, I am not sure if you saw my earlier post regarding this question. After I realized I posted this question in the worksheet section, I left a message to ignore this post, and I reposted in the programming section. The title is 'Info in F but AF and/or AY no info so delete the..' but the question is the same. My name is Louie, if you search by that display name you will see the other post. Please reply wherever is more convenient for you. Thanks again for your help. "Gord Dibben" wrote: Sub deleterows() Dim iLastRow As Long Dim i As Long iLastRow = Cells(Rows.Count, "F").End(xlUp).Row For i = iLastRow To 1 Step -1 If Cells(i, "F").Value < "" Then If Application.CountA(Range(Cells(i, "AF"), _ Cells(i, "AY"))) = 0 Then Rows(i).Delete End If End If Next i End Sub Gord Dibben MS Excel MVP On Thu, 4 Mar 2010 10:13:01 -0800, Louie wrote: I am looking for help getting a macro that works and performs the following steps. Check Column F for information If Column F has information check Column AF and AY for information If Column AF and AY are empty delete the rows. Can you help? . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Hpw do I delete multiple empty rows found between filled rows? | Excel Worksheet Functions | |||
delete empty rows | Excel Discussion (Misc queries) | |||
Delete Empty Rows | Excel Discussion (Misc queries) | |||
How to Delete empty rows in excel in b/w rows with values | Excel Worksheet Functions | |||
Cut filtered rows, paste into next empty row of new sheet, and delete cut rows | Excel Worksheet Functions |