shift=xltoright

  1. Small Paul

    VBA Fails When Only 1 Line of Data

    Hi I have a vba which starts with the following: ActiveSheet.Name = "Salesforce Download" Dim lastrow As Long Application.ScreenUpdating = False Application.DisplayAlerts = False Setmyrange = range("A2", "A" & Cells(Rows.Count, 1).End(xlUp).row) Application.ScreenUpdating = False...
  2. M

    Messy code problem

    My boss (not a spreadsheet man :-)) has created the following code to move some data around his spreadsheet, to be honest I'm quite impressed he has got this far! I am going to improve it when I get chance, but an immediate issue is when the code runs, the last cell of excel becomes T1048574...
  3. R

    Change the range of a macro automatically

    Dears, I want to change the range that the macro pulls automatically, as below: Sub Weekly() ' ' Weekly Macro ' ' Range("A2").Select Range(Selection, Selection.End(xlToRight)).Select Range(Selection, Selection.End(xlToRight)).Select Range(Selection...
  4. M

    Copying formula until the last cell with VBA Macro

    Dear experts, I have been trying to run this macro however the formula copies only until row number 31 in column. Can you please guide me what is wrong with it? I am trying to paste formula in column A and then copy it until the last cell. The macro runs just fine but formula only updates until...
  5. M

    Select columns using "for" - beginner guide

    Hi! Im stuck with this problem, it would be great if you could help me :-) For o = 3 To Z Columns(o).Select Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove Next ________ I want to select...
  6. C

    Runtime error 424 Object Required

    Hey everyone! I created a macro that would make our job easier. For some odd reason it was working fine and afer addig some lines and then deleting them it started giving me this Object error. I am no expert, I might have accidentally deleted something but I don't know what could be the problem...
  7. U

    Cut and insert Columns using VBA

    Hi. I have an Excel Worksheet with 241 columns and around 46 thousand rows of numbers (no blanks anywhere). I only require 9 (nine) columns from the sheet which should be placed in Columns B to J. From recording a macro, and deleting unnecessary cursor movements, I ended up with the following...
  8. U

    Insert Method Of Range Class Failed Error

    I have found a lot of solutions for my problem, the strange thing is that when I change the line it works but when I run it again it fails until I change the line again. If this makes no sense good because it doesn't make sense to me either. I have done this a million times and it has always...
  9. S

    VBA - Reference Workbook in R1C1 Formula

    Set Sourcewb = ActiveWorkbook Set Destwb = Workbooks.Add With Destwb.Sheets("Pay") .Range("B:B").Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove .Range("B3").FormulaR1C1 = "=VLOOKUP(RC[-1],Sourcewb.Sheets(""Strategy"").Range(C5:C52),48,FALSE)" .AutoFill...
  10. Z

    Need help on cleaning up this vba

    Hi this works for me fine. I know I shouldn't be using .Select and a lot of other stuff in here. I tried cleaning it up not using .select and active paste, but when I do so the code doesn't run the same. Some always gets placed wrong. I can definitely use a clean and efficient vba code here and...

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