I don't think I need the set, so deleted it...now I have
Sub DoStuff()
Dim RowCount As Long, x As Long, i As Long
RowCount = ActiveSheet.UsedRange.Rows.Count
i = 1
Do While (i <> RowCount)
If (Cells(i + 1, 1).Value <> Cells(i, 1).Value)Then...
Sorry, but here's another stupid question.
Does .Value return an integer value because the data in cell(i, 1) are string?
The complier is not liking the syntax of the line of code you just gave me.
nik
Hi Skip,
I just mananged to find time to play with this now. I altered the code very slightly (all of which shouldn't make a difference). I'm getting an error in the if stmt...says application-defined error or object-defined error. Thoughts?
Sub DoStuff()
Dim allRows As Range...
I came up with this and I think it's work, but my syntax is wrong. Can someone please help?
Sub DoStuff()
Dim allRows As Range
Set allRows = Cells(Rows.Counter, "L").End(xlUp)
Set i = 0
Do While (i <> Rows.Counter)
if (allRows.Row(i).Cell(x) <> allRows.Row(i + 1).Cell (x+1))...
The reason is that the file needs to be in this format because once I manually insert these rows (which take a fair amount of time)I then copy the file into a different system, which performs an auto check on some prices. The system that I'm copying the file into requires it to be in this...
Hi Skip,
It may be a bad idea to insert empty rows, but that's what I have to do. I need the next data set to start on row 100 and the next on row 200 and then next on row 300, etc.
nik
Hi All,
Sorry for such a question, but I'm still learning about VBA. I know how to create a macro for inserting rows, but I need to alter this code to help my problem. I don't know where to start.
Here's my problem:
I have a huge data file where column A is the unique identifier. For...
Geoff,
I have modified to code to fit my workbook and I am getting a subscript out of range error. See code below:
Sub Loop1()
Dim lRow As Long, IssDate As Date, MatDate As Date, Sum As Double, lRowD As Long, chkDate As Date
lRow = Worksheets("Comet A -...
Hi,
I am a novice user when it comes to VBA, so any help will be greatly appreciated. This is what I'm trying to do:
In my excel work sheet, column A is my start date, column B is my end date and column C are dollar amounts. For example,
31-Jan-03 03-Feb-03 3
03-Dec-02 03-Feb-03 62...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.