6.value

  1. D

    Copy Rows if Value is NOT Equal to...

    What am I doing wrong in the third loop? I want to copy rows if the value is not equal to one of the conditions in my IF statement. I don't get any errors, so my logic/ approach is def wrong. The first 2 loops work just fine. Sub copy_date() Application.ScreenUpdating = False Dim a As Long, b...
  2. G

    vba with multiple if/or criteria

    Hello, I have been using the following code to calculate annual targets, 'Rolling Target' Dim Addvalues If Cells(i, 6).Value >= 1 Then Addvalues = Range("p" & i).Value + Range("s" & i).Value + Range("v" & i).Value + Range("y" & i).Value Range("ab" & i).Value = Addvalues + IIf(Cells(i, 6) <= 8...
  3. 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...
  4. H

    MAX/MIN in vba not working on inactive sheet

    I cant the below code to work as it fails if I do not include the activate/select instruction in the code. Portion highlighted in red are the statements where it fails - Sub data_1min() rNum_1min = Sheets("data_1min").Cells(1, 1).Value + 1 Sheets("data_1min").Cells(rNum_1min, 2).NumberFormat =...
  5. A

    If with hyphen

    Hi everyone I need to add a text to the column C if the text in column F like P-D, or P-E so on. I have done the code but nothing has occurred and I think it may be because of the hyphen. I want to make the criteria either P-E or P-K or P-H then shows as 'No', however I am unsure should I use...
  6. A

    Delete rows and filtering

    Hi everyone I want to delete rows with criteria and to keep the first header row, however the macro below has removed my header row. Also I would like to sort the column F in ascending order but it doesn't work: Please could anyone point out my mistakes. Thanks. Private Sub...
  7. S

    VBA - Index question

    Hi All, I'm new to the VBA world and tryng to learn as much as possible. I have been studying for a few weeks now and I have managed to get an ok understanding. However, I seem to be stuck on the following code: - Sub PREMISE_ID_1() Dim Index As Long Index = 8 Do While Index < 99000...
  8. S

    VBA add up code

    Hi, I want to look up a couple of values based on a If then code, for instance: If Cells(x, 1) = Cells(1,4).Value Then mycount= mycount + Cells(x,2).Value End if Cells(1,5).Value = mycount Then I want to see if there's a difference between the Values in E1 and F1 (Value of F1 is given), so...

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