cellsi

  1. O

    If Then with an and an or

    Thanks in advance for any suggestions for which feedback will be given. Why is the following VBA Code actually bolding the cell and filling it in red when the cell is 1 or 3 for column 13? It is meant to say if j = 13 and if the value of the cell is not 1 or 3, then make it bold and fill it...
  2. H

    Outlook Query

    Hi I have the below code that sends an email if tow conditions are met. I have two questions: Sub email() Dim i As Long, lr As Long, scdata As String, myolapp As Object, myitem As Object lr = Range("A" & Rows.Count).End(xlUp).Row scdata = "" For i = 19 To lr Step 1 If Cells(i, 21) <> 0 And...
  3. Y

    Unable to use Ctrl Z With New Macro

    So I have the below Macro code that is set to change a cell in column E to 0.00 if a cell in column K has the word yes. However, I'm unable to go-back (Ctrl Z) once the I type in Column K (Sometime I type yes & then I have to remove it change it but I want the cell value to go back to its...
  4. O

    VBA Code to Find Errors in a Sheet and Paste it

    Thanks in advance for any suggestions for which I will give feedback. The following is code to search for any errors and flag the cell by filling it red and bolding it. How would I then copy the entire row and past it into a sheet titled "Error.Log" when there is or more or errors in that row...
  5. ExcelNooberino

    If 3 conditions VBA

    Hi! Hope y'all doing just fine... So I have this problem with a recent code I'm working on. Basically I want to apply some formatting to the color off a range of cells after I run this macro I've created but it keeps telling me that there's a "Next without For" and I don't understand why... I...
  6. D

    vba understand step meaning

    Hi, I am trying to understand what does the vba do in the highlighted section: For i = LastRow To 2 Step -1 If WorksheetFunction.CountIf(Range(Cells(2, "C"), Cells(i, "C")), Cells(i, "C")) > 1 Then Rows(i).Delete End If Next I Kind Regards, Dan
  7. R

    duplicate value in column X and delete entire row

    need to ignore blank cells in column X tried this code but it deleted all "nothing" cells Sub Deleteduplicate() Dim N As Long N = Cells(Rows.Count, "X").End(xlUp).Row For i = N To 2 Step -1 Set rlook = Range(Cells(i - 1, "X"), Cells(1, 1)) If...
  8. G

    delete row if the value in column J contains 0

    Hi Everyone, Here i am trying to delete entire row if the value in column 'I' is 0. The below code works but it also deletes the empty spaces that are present in column'I' where that shouldn't happen Can anyone suggest/guide me what changes i should make ?????? last = Cells(Rows.Count...
  9. G

    Excel-Not Responding State

    Hi everyone, Here i am trying with this code for copying the values which are present in column 'B' based on column 'H' ,i have tried with the below code but it takes me lot of time , if i have huge data in my sheet, it goes to Excel-Not Responding State Is their any other possible way to...
  10. N

    VBA ignore blank cells

    Here is my code to create outlook calendar reminders: Option Explicit Public Sub CreateOutlookAppointments() Sheets("Sheet1").Visible = True Application.ScreenUpdating = False Sheets("Sheet1").Select On Error GoTo Err_Execute Dim olApp As Outlook.Application Dim olAppt As...
  11. G

    Unable to get the countifs property of the worksheetfunction class

    Hi, can anyone tell me what I am doing wrong here, I keepgetting the following error “Unable to get the countifs property of theworksheetfunction class Dim lastrowcolumnz As Long lastrowcolumnz = Range("a" &Rows.Count).End(xlUp).Row For i = 2 To lastrowcolumnz Cells(i, 20)...
  12. U

    “Dates” set as General, should be set to DATES

    I have my VBA script working correctly, however, I do not understand why the dates on column "C" are set and changed to "General" when they should remain as Dates. If my dates do not land on Sheet 2 as Dates then formula on column "E" will not display Days Outstanding as sheet should display...
  13. O

    For Loop Not Executing

    Thanks in advance for any suggestions and I will post feedback! The code should do copy and Paste Transpose seven times, but it only does it once. Any idea why? Seems like it's not running the Loop and the issue must be with If Then Statements. The only part of my code that seems to get...
  14. R

    VBA Sheets(Array).Select mismatch

    Hi - I am trying to copy and save a number of sheet groups (i.e. sheet 1, 2, 3, and 5 save; sheet 6, 7, 8, and 10 save) and a loop to do this. However I keep getting mismatch on the Sheets(array) section. Any help would be appreciated. Sub Tabs() ' ' To automatically copy tabs into new excel...
  15. rinneii

    ColorIndex and Offset

    I need to use the offset property to get color in another column. This is what I have so far: Option Explicit Dim FinalRow As Integer Dim i As Integer Sub Colorfruit() FinalRow = Cells(Rows.Count, 1).End(xlUp).Row For i = 3 To FinalRow If Cells(i, 1).Value = "Grapefruit" Then With...
  16. J

    help on syntax logic on paste special

    Hi everyone I have a small issue here and would like to seek some advice from the veteran around here. I did the following code to copy and paste some information. however, I have managed to achieve a copy and paste into the worksheet I want. How do I change the part that's in red to copy and...
  17. S

    Hơw can I copy special range then paste to another sheet

    Hi all: I have wb copydata.xlsm with sheet("source","des") In sheets("source") I want copy multiple ranges from row i (i = 1 to lastrow) that: If cells(i,21)<>0 then Copy range("Ai:Di") and range("Ui: last column) to sheets("des") Please help me to do that with VBA, I have over 1.000 rows...
  18. A

    Can anyone reduce my code?

    Hi I have a code that works perfectly however it is long and takes a while to run - can anyone help to shorten the code? The code basically looks at different sections and hides rows if all columns contain 0. Sub HideRows() Dim i As Long Dim j As Long Dim hide As Boolean For i = 6 To 15...
  19. K

    Loop for testing

    Hi guys, Just writing a script for testing "J" columns value. If it's >= 200, then "AV" column show "passed" But seems like below doesn't work. Thanks for your help in advance. Sub a() Dim i As Long For i = 1 To Rows.Count If Cells(i, "J").Value >= 200 Then Cells(i, "AV").Value =...
  20. S

    Next Without For error (again)

    Right, once again I'm struggling with the Next without For error. I've got a loop ("i") which if a certain condition is met (d2 > d) I want to terminate immediately and return to the beginning of the If statement. If d2 isn't greater than I want the loop to continue until the Next command...

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