Offset VBA

fari1

Active Member
Joined
May 29, 2011
Messages
362
Code:
With Sheets("info output")
                  With .Cells(.Rows.Count, 8).End(xlUp).Columns.Offset(0, 2)
                .Columns.Offset(, 2).Value = Sheets("info").Range("A1").Value
                        End With
                        End With

hi, my above code is presumed to offset column 8 with one column right next to the last used row in column 9, but its going one row up, i dont know why, totally fed up with it:(
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
right in the next last used last cell of column 8
e.g last populated cell in column 8 was H13, then i want the result in I13
 
Upvote 0
Code:
With Sheets("info output")
            .Cells(.Rows.Count, 8).End(xlUp).Offset(0, 1).Value = _
                Sheets("info").Range("A1").Value
End With
 
Upvote 0
Do you have rows hidden or data filtered at the point you run this code? Assuming not and H13 contains data then the A1 value will be placed in I13
 
Upvote 0
You can email it to me - I will PM you with my email address. Please give a brief description of the problem in your email and state which cell you expect the value to be entered in and which cell it actuially is entered in
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,730
Members
452,939
Latest member
WCrawford

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top