3.value

  1. P

    Search and Offset Multiple Strings

    I need help creating a code that searches for multiple "items", grabs the offset and pastes it in another sheet. My final goal is to track leave used. I started with Sunday, Sunday is the only day that uses special WK codes. The rest of the week uses the same code. I will be pasting the rest of...
  2. Z

    copy to range problem

    [code] Sub checkwood() Dim i As Integer Dim r2 As Integer Dim lastrow1 As Long Dim woodcoasters As Range lastrow1 = Cells(Rows.Count, 1).End(xlUp).Row For i = 2 To lastrow1 r2 = 2 If Cells(i, 3).Value = Cells(14, 3).Value Then Range("A" & i).Copy Range("j" &...
  3. A

    If and End with

    Hi everyone There is an error 'End if without block if' with the code below: Please could anyone help. Sub RemoveRows() Sheet1.Select Dim x As Long,LastRow As Long LastRow = Cells(Rows.Count,"A").End(xlUp).Row For x = LastRow To2 Step -1 If Cells(x,3).Value <> "FASS"...
  4. P

    Combine Strings With Variable that references a formula with VBA

    I am trying to put a string into my formula (which I know would need double quotes). However the formula is already the cell value, please see the below. Cel.Offset(0, 3).Value = "=""String "" & Cel.Offset(0, 3).Value" The Cel.Offset(0,3).Value on the right hand side of the = sign is...
  5. Nelson78

    Worksheet_Change doesn't sum

    Hello everybody. In sheet 1 I have the below code ( Private Sub Worksheet_Change(ByVal Target As Range) ) At a certain point I have this instructions: the red one doesn't work (no errors, but the value is not updated). '...... Dim varResult As Variant varResult...
  6. U

    Compile error: Statements and labels invalid between Select Case and first Case

    My VBA script errors when I try to insert data from Sheet1 into Sheet2. I get the following error: "Compile error: Statements and labels invalid between Select Case and first Case". I removed the second "select Case" all works okay, listed below, VBA script. Wondering what else should be...
  7. Nelson78

    Vba: Worksheet_Change doesn't work if I insert 0 (zero)

    Hello everybody. I've in sheet1 a Change Event in case a cell value is changed. It seems to work well, except if I insert 0 in a cell. I mean: if I find that cell with 20 and change it with zero, nothing happens. If I insert, for instance, 0,0000000001 the change event works regularly. The...
  8. 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
  9. L

    E-mail question at Excel 2007

    Hello, need advice with the following Quantity is at column 2 and supplier is at column 3. If the quanity is zero do not send the email at that specific supplier I attach the code Application.ScreenUpdating = False Sheets("ORDERS").Select Columns.EntireColumn.Hidden = False...
  10. L

    passing Range name as an argument to WorksheetFunction

    Hi The code below for some reason does not work. I tried to pass the range between " " but did not work. Any help would be appreciated ' did not work either Cells(1, 3).Value = WorksheetFunction.Sum("myrange") Sub worksheetfunctions() Range("a1:a20").Name = "myrange"...
  11. sharky12345

    Delete Row if criteria is met

    Guys - I'm using this to copy values to another workbook only if the cell in column A and D are not blank; For Each Cell In Sheet1.Range("A2:A95")If Cell.Value <> "" Then If Cell.Offset(0, 3).Value <> "" ThenSet ws = DestFile.Sheets("Data") iRow = ws.Cells(Rows.Count, 1).End(xlUp).Offset(1...
  12. E

    Why does my loop not stop?

    Hello there, I ran the code before on a spreadsheet with a number of lines. I basically want to remove any lines with the value in column C starting with 'M'. As there wouldn't be two blank rows in a row anywhere on the sheet apart from at the end of the filled range, I used the loop conditions...
  13. P

    Slow VBA - Need help finding bottleneck

    Hello, This is my first time trying to tackle things in excel using VBA, so some of the items were shamelessly stolen off of various message boards and youtube tutorials and modified to fit my needs. However, this seems to be unreliable and very slow. It takes about 20 seconds to update and...
  14. A

    Run-time error '1004' when Protecting Sheet

    Hello Excel champions of the world! I am having a confusing problem... All my code seems to work just fine until I protect the worksheet, I get run-time error '1004': application-defined or object-defined error. The code underlined is where the first hit comes into play and I am not...
  15. S

    Excel VBA to Loop

    Hello everyone, I need to make this code run as one. Thank you for your help. Sub InsertSaturday() Dim i As Integer i = 6 Do While i < 100 Cells(i, 3).Value = "Saturday" i = i + 6 Loop End Sub Sub InsertSunday() Dim j As Integer j = 7 Do While j < 100 Cells(j, 3).Value = "Sunday"...
  16. Nelson78

    VBA: just one loop instead of one for any check

    Hello everybody. I have a macro that produces the right result. The aspect to improuve is in making it quicker: as you can see in this small part, I have a lot of checks to perform in any single cell. I suppose that checking everything in a single loop could reduce in a significant way the...
  17. B

    Vba macro strange behaviour and wrong values.

    Hi, I am experiencing some strange issues using my macro for excel, I'm no professional coder but it reads like it should work okay. In fact it does work on the first cell and then the results are strange. I have a macro that when run on particular cell will color the surrounding cells green...
  18. J

    Time stamp cell range

    Hi, sorry I'm having difficulties with this, solutions appreciated very much. I'm trying to time stamp Column "L" and effected rows with current date time (24hour clock) LastRow = Range("A" & Rows.Count).End(xlUp).Row For i = LastRow To 2 Step -1 If Cells(i, 3).Value > 0 Then...
  19. J

    Very slow VBA

    Hello, I'm quite new to VBA and I just recently wrote this code to extract data from one main worksheet to copy/paste into each respective client worksheet. Contained in the workbook is a main worksheet with currently over 5000 entries and then the 14 separate client worksheets. Two...
  20. T

    Game score not showing up in cell (2048 VBA)

    I'm working on a 3x3 version of the 2048 game and am having trouble displaying the score and highscore. The score is supposed to be equal to the new cell value if two cells have merged. Here is a sample of what I am working with (note 3x3 grid is "C4:E6"): ' Up button column C merging C5 into...

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