activecell.value

  1. G

    VBA Find and Select loop

    I have the below line of code as part of my VBA . As shown below, the first "find " section looks for the word "Paris". When it finds the work Paris, it updates the cell value as France and then moves on to the 2nd "find" section where it looks for the word "London and then updates the cell...
  2. D

    How to choose a specific cell when a form closes

    Hi all, I'm quite new here and new to vba. I have a worksheet that opens a pop up calendar when I click on a certain cell. When I then click on a date on that pop up it puts the date into that particular cell and then the calendar closes. This is all good and working. Is there a way that when...
  3. D

    Duplicate Entries

    Hi again. I would like to prevent duplicate entries to be entered into a spreadsheet when attempting to add with a error message saying "Duplicate Entry". VBA Script below; Private Sub ScanTB_BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean) Dim LastRowFilled As Long Dim DataArray(1...
  4. S

    Referencing another Worksheet in VBA

    I was given this project to develop a form that by a click a button will send the answers to a separate table. It currently works. The user fills out the form in "Change Order Form (sheet1)" , when finished the submit button is clicked which then sends the responses a table in "Change Order Log...
  5. A

    Linear Interpolation in VBA

    Hey Everyone, I have been working on a function to linear interpolate some data- I got it to where it was giving values however they seem to be incorrect. I cant find an error in the equation so far so i am not sure where to fix things. I am also extremely new to VBA to bear with me on the...
  6. O

    I just want to copy and insert rows

    The following code has worked before, but now it doesn't and I can't figure out why. I just determine the value in the activecell and if it's more than one I just copy the row and insert it below the selected row, but for some reason I get a runtime error 1004 and the insert method fails. I...
  7. J

    Looking for a way to loop this

    This may be an easy one but I am just starting to learn all of this. below is a code that works great, only i would have to type it over and over again until i reach row 250 :( i want to loop through the E Column cell rows from 2 - 250 until it reaches the end. Any help would be greatly...
  8. Small Paul

    Run Time Error 9

    Hi I have the following section of code within a large macro: Worksheets("Dubai Data").ActivateActiveCell.Offset(0, 2).Copy detail = ActiveCell.value Sheets(detail).Select ActiveCell.Offset(-2, 1).PasteSpecial xlPasteValues ActiveCell.Font.Bold = True Range(cells(ActiveCell.row, "C")...
  9. R

    Populate Table from list box

    Hello, First off this is my first post, normally i can find my solutions but i can't quite figure it out this time, so sorry if this has already been asked. I'm designing a workbook where users can update the data through a userform. Currently the userform has a listbox that pulls from a...
  10. C

    Speed up code

    Is there anyway to speed up how Im doing this? I have more code like this but only posted a portion of it. Takes about 5 seconds to run the macro, would really like to lower that time. ActiveCell.Offset(rowOffset:=0, columnOffset:=1).Activate ActiveCell.Value = B1...
  11. S

    Copy Excel charts as chart objects (not pictures) into Powerpoint

    Hello, I have a piece of code that I have used successfully many times going through different ranges in excel (mainly containing charts) and pasting theme into powerpoint as images. Now I need to do the same but paste the charts as chart objects instead. Any tips? * Sub open_ppt() Dim...
  12. V

    Problem with "dd-mm-yy hh:mm" and "mm-dd-yy hh:mm"

    Hi Guys, I am struggeling with an anoying problem. I have made a userform in an Excelsheet. This form has 2 textboxes (one for date and one for time). The Date is allready filled in with the date of today. The user has to fill in the time and after hitting 'enter' the form saves automatictly...
  13. S

    Compile error Procedure too large

    hi I really hope someone can help me in how to code this correctly, the sub does work perfectly i am pulling a motorcycle from a list and the next one in the list is copied to line 31 this works perfectly when I use the same code for say 300 but for 897 it throws up the error, I just don't know...
  14. S

    VBA search for duplicates & display warning message

    I have the following code. Essentially, looking to find any duplicates in column B. The problem, is it continues to duplicate the function. Basically, what I want it to do is once it finds a duplicate in sheet names "Control Sheet" then display message and stop. No need to continue looping. Is...
  15. 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...
  16. P

    Assistance with Looping Needed

    Greetings, I have some code that works, but but now I need to make it loop upwards through the blank cells and stop before overwriting the first non-blank cell. I just can't seem to figure out that whole "i = / Next i" thing. Also, in the last "Else" statement if the cell (0,-13) from Active...
  17. V

    Little Bit Stuck

    Hi there. I have been trying to write some code that will compare the value of a cell to all the values in a multidimensional array that a person establishes while using the program. If the value in the active cell matches one of the values in the first dimension (column) of the array, then...
  18. mole999

    Text DateFixer

    Just imported a load of CSV values that came across as 1/15/2019 12:22 date and time I was following > https://www.mrexcel.com/forum/excel-questions/1086344-formatting-dates.html which works when no time value is involved. Just wondering if a small vba script could be developed that would strip...
  19. J

    vba query

    I use the following formula to extract postcodes from addresses and it works perfectly. TRIM(RIGHT(SUBSTITUTE(A2,"",REPT(" ",10)),20))<o:p></o:p> However, when I insert the same formula in a vba loop, it does not allow me to execute. REPT is highlighted and the dialogue box says "Compile...
  20. G

    Error running this code - If ActiveCell.Value = "#N/A"

    Hi, hope someone can help. I'm trying to run this code but when the cell value is "#N/A# I get an error 'type mismatch', note that the cell value is text not the formula =NA(). If ActiveCell.Value = "#N/A" Then ActiveCell.ClearContents ElseIf ActiveCell.Value = "Error" Then...

Some videos you may like

This Week's Hot Topics

  • Problem with Radio Button's format control
    I am creating an employee evaluation template (a sample is below) Column A is the category Column B, C D, E and F will be ratings (unacceptable...
  • Last Display on userform to a Listbox
    [CODE=vba] lstdisplay.ColumnCount = 15 lstdisplay.RowSource = "A1:O600000" [/CODE] So when i do this it Displays everything on the sheet i am...
  • Rename and move files to a new location
    Dear all, I have an excel file with the following information. The actual file name is at column A but i want to rename it using the following...
  • Help with True/False Formula
    Hello! Am stumped how to fix this formula, in which my result returns 'True', but it should return False. =IF(AG2=True...
  • Clear extra characters from a provided range of cells
    Dear All, I have following code which gives me desired output to remove extra characters from a provided range. But it takes too much time when...
  • Help with Current and highest streaks
    Hi there, I've just joined the forum and this is my first post. I've already spent quite a bit of time searching the net and this forum for a...
Top