activecell.offset0

  1. B

    Using Cells property to represent the active range

    I have the following VBA Code Snippet and I've trying to learn how to use the Cells object. How would I replace the Activecell object with the Cells object in the Do Loop? In this instance, the Active cell would be Cells(2,2). What confuses me is how to replace the activecell object with...
  2. R

    Do If Loop Help

    I am trying to write a do if loop command that takes a look at data in 3 different columns and then outputs a value to a 4th column (F in the command). When I run this command, Excel stops responding, I have even left my computer for a few hours and still not responding, please help with what...
  3. M

    AppActivet for inactive webpage.

    Hi, my Webpage is not active when i run this macro, Sendkeyps UP hapens in excel, is there a way to make the web paga active, like AppActive? I cant get AppActive to work befor the sendkeys command. The funny thing is that the macro works IF i open VBA befor i run it.. Sub automatic_order()...
  4. P

    Do Loop running slow

    Hi all I wrote this simple code but it is taking a long time to run. Is there a faster running macro? Range("BA9").Select Do ActiveCell.Select If ActiveCell.HasFormula Then ActiveCell.Select Selection.Copy ActiveCell.Offset(0, -48).Select ActiveSheet.Paste...
  5. K

    Offset from active cell until given range

    Hey, So here is my code and i require it to offset select cells to the left until J23 and to the right until NO23. Sub hideme() Sheets("Settings").Visible = True Sheets("Main").Select For Each cell In ActiveSheet.Range("J23:NO23") If cell.Value = [Today()] Then cell.Select End...
  6. V

    delete comment if present in VBA

    Hi Team, I have a macro that works fine that adds a comment to the cells but if there is one there already it will stop. What I was hoping to do was rather that delete the comment, could I append another comment to it rather than delete and lose the previous one? Code as below for the part...
  7. T

    VBA index

    How can this code be fixed to return the value from Row 6 Column 5 from Workbook "C S O N H Input", Sheet1, Range("A1:P1000")? ActiveCell.Offset(0, 3).Value = WorksheetFunction.Index([C S O N H Input.xlsx].Sheets("Sheet1").Range("A1:P1000"), 6, 5) Thanks Tom
  8. J

    How do i copy values from the previous sheet?

    Hi, i have the following ActiveCell.Offset(0, 0).Range("A1:C500").Value2 = ActiveCell.Offset(0, 0).Range("A1:C500").Value2 how do i modify this to copy values from previous sheet instead of current into same range if it helps, the sheets are labelled as weekly dates (dd-mm) 26-11 03-12 10-12...
  9. J

    VBA to upload Data from Excel to Access

    Hi, Not sure if I should post this on the excel or access forum butthought I would try here first. I have used the below code in the past to upload data to MSaccess 2010 from Excel 2010 , but I am now using MS 2013 and the code is nolonger working. I am receiving the error unrecognised...
  10. T

    VBA Integer Adding with Offset Cells

    Hey everyone! I'm working on a macro that finds a category in my spreadsheet and adds the offset values to integers and then pastes these integers in a different sheet/cells. I'm not getting an error but my values are returning as 0 when I should be getting numbers. Here's my code: Sub...
  11. M

    Create a table after performing a action, VBA

    Hello, I have a VBA code that I had made, but having a difficult time making a table from it. It has to be from a current selection, instead of A5 as it is never in the same cell in each workbook. Can someone help me? Sub template() ' ' template Macro ' ' ActiveCell.Select...
  12. J

    Pass variable from Private Sub Worksheet_SelectionChange to a Module ?

    Hi, having trouble figuring this out, i have the following sheet code: Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Not Intersect(Target, Range("Z2:Z50")) Is Nothing Then If Target.Offset(0, 1).Value = Target.Offset(0, 2).Value Then 'do...
  13. M

    copy a variable range

    Hi, i have to copy a variable range in a for next loop, "s" is a variable the line in bold doesn't work it should copy the range from activecell to row "s" (s is a integer) Sheets("taslak").Activate ActiveCell.Offset(0, 1).Select Range(Cells(0, 0), Cells(0 & s)).Select Selection.Copy Who...
  14. B

    Concatenate Msg Box Results

    My question is ... how would I concatenate the results of the following message box code ... MsgBox ActiveCell.Offset(0,1) & vbNewLine & ActiveCell.Offset(0,2) The coded above makes the message box longer when there is no text found in ActiveCell.Offset(0,2) I would like the box to be only as...
  15. sharky12345

    Get filename without extension

    I'm using this to loop through a folder and list all found files; Sub GetFolder() Range("A:L").ClearContents Range("A1").Value = "Name" Range("B1").Value = "ParentFolder" Range("C1").Value = "Size (KB)" Range("D1").Value = "DateLastModified" Range("E1").Value = "DateCreated"...
  16. G

    Created a Pop-up Macro with "Add Part" Button, Pop-up Fields no blank for additional parts! Help

    I'm using this macro to populate my parts database thru a pop-up dialog box along with a "Add Part" button that initiates the Pop-up Dialog box using the module below. It works great for the first part! But when I push the "Add Part" button for the next part, the fields are still populated...
  17. H

    Need VBA code for open workbook - If already open, then activate

    Hi all, I am completely new here. I have looked over the forum and I have found posts, that related to what I am looking for assistance with. However I cannot get the solutions to work for me. Question: I have the below VBA code and it works a charm - It could probably be simpler, but it works...
  18. F

    VBA Paste Message box values into cells

    Hiya, Thank you, in advance, for your help. I currently have a macro that identifies unique data, based on cells "B"-"D". As the macro loops, it pastes the unique count number into Column "AL". At the end of the section, a MsgBox appears with the total unique # and 25% of that #. ( This then...
  19. R

    Worksheet reference issue?

    I have a macro that should run but I am linking it to cell N14 for the file name and cell N16 for the Worksheet tab name. I cannot get this macro to run and it stops where I reference the worksheet name in cell N16. If someone could look at this and possibly assist me, I would appreciate it...
  20. R

    Script will not paste on Macro3

    I have created a spreadsheet that pulls all data as required but when the code runs to Macro3, it gets hung up and will not paste into my sheet. If someone can tell me what I could use to make this work for a paste of the tab named what is in cell N16, I would appreciate it... The process runs...

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