057 发表于 2008-1-23 09:18:05

VBA in Excel

I have never written anything in VBA for excel.that being said, I could use some help with a function to purge a spreadsheet.Any takers?

萝卜扬的后花园 发表于 2008-1-23 09:22:56


Huh?Purge as in like, selecting everything and pressing the DEL key??

劍雨飄翔 发表于 2008-1-23 09:26:56

Yeshahaha,
OK no, I need to search Column A for each number, like 11815 in above example, then go over to the H column and compare the $$ amount to the one below.Delete the row which iscomparison is pretty easy.Deleting the row is the next challenge.I also thought about using N (integer) to keep up with where I am row.count wise
Edit: Attached XLS file

大海 发表于 2008-1-23 09:30:41

Sorry it took so long, I didn't know you couldn't post xls file directly.

双河农场 发表于 2008-1-23 09:31:31

Yeshahaha,
OK no, I need to search Column A for each number, like 11815 in above example, then go over to the H column and compare the $$ amount to the one below.Delete the row which isy then
rows.delete yadda

粉红情书 发表于 2008-1-23 09:37:14

First hard code, then modify to allow for variables.

明道 发表于 2008-1-23 09:40:53

ok, now I see where your going.The problem is I know very little about VBA in excel.How do I grab a row?Im thinking there should be an activerow, but I haven't found it yet.Once I figure out how to grab a row, the > logic should be pretty straightforward
页: [1]
查看完整版本: VBA in Excel