2.value

  1. S

    Zoom in on an image (picture) displayed in workbook

    I'm using the following code to display an image in a workbook. Sub Image21() On Error GoTo ProcExit21 Dim objPicture As Picture With Sheets("Working").Cells(1, 1) ' Picture displays in cell from row, column Set objPicture = .Parent.Pictures.Insert(Sheets("Working").Cells(2...
  2. J

    Date loop

    Hello: I need a sub to input last month's date into a column of data and then hard code the date. The only solution I came up with is below, but I'm wondering why it's not creating a circular reference. Thank you! I'm sure it has something to do with equivalency, but I'm still new! Sub temp()...
  3. M

    VBA - combining rows

    Hi guys Probably quite a simple fix for someone who knows VB. I found a really useful macro (thank you hiker95) on this site for combining multiple rows with a unique identifier. It's configured to combine the first 2 columns of each row after the unique ID in column 1. All I need it to do is...
  4. B

    Unprotect_Run code_Protect sheet Excel VBA

    Need Help... I got runtime error 1004. Application defined or object defined error. In excel sheet, Column H,I,J is locked and protected. I want to capture the user name, date and week in column H,I,J when someone update the cell in column G. below is the code. (It's work when sheet is not...
  5. S

    Minimum Value

    Dear all I am trying to find the minimum value in the array Stress(i,j) The maximum value appears correct. However the minimum value always appears zero if all the elements are positive. Kindly help I am posting the code below Private Sub CommandButton1_Click() Dim i As Integer Dim...
  6. H

    VBA - Content Banding

    Hi, I am using the below code for content banding whenever a value changes in column B Can anybody please amend the code to look at visible rows. Like when data is filtered. Sub Colorize() Dim r As Long, val As Long, c As Long r = 1 val = ActiveSheet.Cells(r, 2).Value c = 34...
  7. O

    VBA Code for Date Created and Date Modified

    Thanks in advance and feedback will be given for any suggestions. I've done an exhaustive search and anything I find and try to incorporate is giving issues. How do I add the date created and date modified to this file. It currently get the file name and places it in column A, and I would like...
  8. R

    Loop not working/crashing

    Hello everyone! I am a pretty beginner vba user and having some trouble getting a loop to work. I have a pretty extensive formatting code here, which works perfectly on a single worksheet. When I then try to have it loop through every single worksheet in the workbook except for the "Original"...
  9. V

    Userform formulas not working if updated

    Hello, I am creating a workbook where the user inputs data with 17 userforms. The first four userforms always show up. On the first userform I have 13 check boxes which determine if any of the other userforms are activated. If the checkbox is selected the associated userform will become...
  10. N

    Easy VBA syntax

    One more question... For Each Cell In Range("Contact") If Cell.Value = "I&S" Then Cell.Offset(0, 1).Value = "No" Cell.Offset(0, 2).Value = "Yes" end if The code works fine, but is it possible to include both outcomes in one line without a block if? something like - If Cell.Value =...
  11. N

    Easy VBA syntax

    If Cell.Value = "I&S" Then Cell.Offset(0, 1).Value = "No" And Cell.Offset(0, 2).Value = "Yes" The first part of the above code works fine - if the cell being evaluated is "I&S" then the cell to the right populates with "No". This works because I ran it separately. But when I add the second...
  12. S

    Object Doesn't support this property or method runtime error

    I am using the following code to return an integer value representing the number of days between two dates. With Application Z = .Abs(TS.Cells(Q, 2).value - TS.Cells(B, 2).value) End With I would like to...
  13. D

    How to split text based on multiple delimiter like dash (-) ?

    hello, I am using the following code to split It works for me if the string contains one dash. For example, J2-33 results: J2 and 33. However, If the string is BMS-J3-24 then it doesn't work. I am expecting the result BMS-J3 in column N and 24 in column O Any help is appreciated.
  14. R

    VBA: Insert Icon Based On Table

    I am looking to insert icons based on the category of the entry (not all using that same icon url below). Any ideas on how to combine the Cells(i,n) formula to output the icons? Any other ideas? Sub Macro() 'Part 1 Dim p As Integer p = 3 Do While Worksheets("PoAP (Data)").Cells(p, 2).Value...
  15. S

    Trying to colour cells based on RGB values

    my spreadsheet has data in Coluns A thru E and j Thru R in F, G and H I have the RGB values and I want to colour column I Usng the follwing code I am able to colour the cells but the macro throws a Run-Time error '13': type mismatch and hightlights .Interior.Color = RGB(.Offset(, -3).Value...
  16. A

    Wanting all cells that are supposed to be dates to be in MM/DD/YY format

    I am trying to get just the date fields in my spreadsheet to always be MM/DD/YY format no matter what kind of date is entered such as 1/1 will come out 01/01/18 or 1 jan will change to 01/01/18 etc. For the most part I got it to work with the codes below, the problem I am now encountering, that...
  17. C

    VBA .Paste Methods

    Frequently when I write code such as the following... Sheets("Sheet2").Range("A2").Paste I get runtime error 438 "object doesn't support this property or method" I usually just change it to .PasteSpecial or try another way of pasting and work it out. However, I have never understood why...
  18. K

    Match column between sheet, copy offset and combine duplicate

    Hi, New in this forum, I am having a problem with my vba code, what i want is to match column from 2 different sheet,copy offset and sum up if matched values is greater than 1. The problem with below codes, cannot sum up values if duplicate. Thank you. Private Sub CommandButton1_Click()...
  19. gheyman

    Verifying Certain Cells have input

    I have code that I want to run only if several cells have data in it. E7 E9 E11 E13 E15 M7 M9 M11 M13 M15 I don't want it to do an If for each individual cell (If, then, If, Then....) I want to run the code and check these. If any are blank, stop the code and open UserForm5 Private Sub...
  20. K

    Excel macro formats only the first instance of a repeated value

    I have an Excel makro that looks like this I expected it to format and left align all instances of Streckkod and Återlämningsdatum, but it only works for the forst occurrence. What am I doing wrong? I'm just a copy-paste programmer and this is the second time I have tried to do something with...

Some videos you may like

This Week's Hot Topics

  • help please
    SORRY NOT ANY GOOD AT EXCEL SO HELP WOULD BE MUCH APPRECIATED this formula is in a sheet called ignore...
  • two formulas needed
    Hello, I'll try my best to explain this: First formula needed in Sheet1 cell A2: If Sheet1 cell B2 = Sheet2 cell B2 then return a 1. If not then...
  • Dynamic Counts
    Good afternoon, we are tidying up some data & the data seems to be growing quicker than we are tidying it up! What we confirm (by reviewing it...
  • Help Excel formula eliminate duplicate values and keep only 2 identical rows.
    as picture below column A has a duplicate value. but the values are not the same as the rule. sometimes 4 rows, sometimes 10 rows or 7 or 9...
  • Macro Compile Error Sub or Function not defined
    Hello, I am trying to run macros from a validation list, all macros have been created and run perfectly on there own but I'm getting a compile...
  • Last row combined with Current Region VBA
    I'm generally happy finding the last row of data through something like Lastrow = Cells(Rows.Count, "D").End(xlUp) but I don't always receive data...
Top