Does this look anything like it ?
Range(Range("here"), Range("IV", ActiveCell.Row).End(xlLeft)).copy Range("here", Offset(1, 0))
Does this look anything like it ?
Range(Range("here"), Range("IV", ActiveCell.Row).End(xlLeft)).copy Range("here", Offset(1, 0))
how can I tell vba to select the cell 'IV' of whatever row I'm on ?
For instance if row 3 is empty i want to select IV3 and then use :xlLeft to select the last column.
And if row 7 is the next empty row then I want to select IV7......
Thanks Chris, but I'm still getting the Run Time 1004 error.
Ooops, that was an older version, here's the current one.
Range(Range("here"), Range("here").End(xlRight)).Copy
Here's my current code, having problems on the Range line.......
For i = rng.Rows.Count To 1 Step -1
ActiveCell.Select
If ActiveCell = "" Then
ActiveCell.Offset(-1, 0).Select
ActiveCell.Name = "here"
Range(Range("here"), Range("here").End(xlLeft)).Select
ActiveCell.Offset(1, 0).PasteSpecial Paste:=xlAll
Else
ActiveCell.Offset(1, 0).Select
End If
Next
Hmmm, here's one for ya.
I have a table of data, first column contains dates then alternate columns of acct number and balance across the sheet.
I have sorted through the date column and inserted an entire row for each day at the weekend and inserted the correct date in this column.
I know want to scroll through column b, and whenever there is a blank I need to copy the above row into this column, except for the date in column a.
Having some problems defining a range to do this.
Any ideas ??
:flower:
Thanks Jack,
I have an Offset/Match function in the cell and I am trying to discover which cell it is pointing to (which is on a different worksheet) as the amounts on the sheet are all very similar.
I know it's a nice easy one, but I have a mental block !!
How can I see which cell a function is pointing to, rather than seeing the value of the cell ??? :flower:
Cheers Chris,
I will have a look at your description and see if it will sink through the skull so I can understand what the hell I'm doing !!
Have a good weekend mate., I'm off to the beach :coolrsvd:
Helllppppp :no:
Hmmm,
It's only me !
I'm trying to insert weekends into a range of dates, surprise, surprise, I've done it wrong !!
Sub Wkendsadd()
Dim rng As Range, i As Integer, Mydate
Range("A1", Range("A65536").End(xlUp)).Name = "MyRange"
Set rng = Range("MyRange")
Range("A1").Activate
For i = rng.Rows.Count To 1 Step -1
ActiveCell.Name = "Mydate"
If Mydate = WeekDay(Mydate, vbFriday) Then
EntireRow.copy
ActiveCell.Offset(1, 0).Select
EntireRow.Insert.Paste
Else
ActiveCell.Offset(1, 0).Select
End If
Next
Set MyRange = Nothing
ActiveWorkbook.Names("MyRange").Delete
ActiveWorkbook.Names("Mydate").Delete
End Sub
Can anyone put me on the right track ??
:no:
Ok, here's the raw data.
1st column is the date and then the colemsn alternate account number, account balance, etc, etc.
The summary sheet just needs to list the balances but I assume I use a match function to be able to find the correct account balance to list ?
Hmmm,
Chris brought these 2 handy little functions to my attention so I've had a look and them and I'm petrified !!!
I have a sumary sheet that links to a raw data sheet called "IMP". My data in IMP always starts in row 1 but the column could change each month when I update.
Can anyone give me an example of how my function should read ??? :wow:
I managed to work this one out.
Too much brain strain has given me a splitting headache and I'm going to the pub for a few hours to recover :guitar:
Hey there Chris,
I thought they all matched up. Hmmmm......
By the way how's the weather back in Blighty, not long til I'm back home !!
Ok guys,
I would like each account section moved up alongside the dates at the top of the page.
I will then insert the weekends and public holidays into the data.
Oh dear, I know it's a tough one.... :puzzled:
Me again.
I have now got myself to the situation on the worksheet I have u/l below.
I would now like to take each account as a aseparate section and paste it to the top row alongside the dates.
Hopefully I will then add in rows for weekend dates and then link my summary sheet into this info.
i) Is this the best technique ?
ii) If it is, what's the quickest method of acheiving this ?
Hopefully yours.........:regan:
Thanks very much for that Dave. It now does exactly what I want.
You're a star of the highest order !!