cell.offset0

  1. S

    help adjusting code

    hi, I'm clueless at coding so would appreciate the following significantly How can I adapt the following so that it adds the test "This is where I insert the text" above the table in the email and can the macro also send out the email? (currently it creates the email but doesn't send) the...
  2. J

    Change font color and style

    Hello, I came across this code which changes the Font color for individual names within a Range. How can i also include the functionality to change the font Name, Style Size and Boldness for each individually? Thanks for any help! Sub Change_FontColor() Set MyPlage = Range("NamesList")...
  3. B

    last used cell in range xlup

    how can i shorten up a range with usedrange in a range? or how to properly use last row used xlup? something like: set source = range ("E3:E4000").usedrange or set source = range ("E3").end.xlup Set source = Range("E3:E4000") source.Interior.Color = xlNone For Each cell In source...
  4. B

    delete old files from, folder and list, shift cells up under conditions.

    the issue is that the code is is deleting more than i ask for. it also deletes a cell that is not colored. Sub delete_test_2() Dim MyFolder As String Dim cell As Range Application.ScreenUpdating = False With Sheets("Delete Revs") MyFolder = .Range("K1").Value & "\" For Each cell...
  5. Johnny Thunder

    VBA Help - If Cell Contains Partial String Then.......

    Hello all, Have a question that I thought I could easily answer but for whatever reason it doesn't seem to be working so another pair of eyes may help. I have a For Each Cell in Range Statement that looks at a Doc Type (2 Digit Variable) and when it finds "KR" to Search a Offset Cell for...
  6. S

    Indirect within VBA

    Hi, I have some code that sends emails based on a range of cells however I want to make the reference indirect as sometimes there will be 5 rows to send and others there will be 25 rows. The below code works fine I just need help on the row that says " For Each cell In ws.Range("A2:A2")", how do...
  7. A

    vba code

    hello I need a vba code: ıf cell deleted then cell.offset(0 , next all in range) be delete
  8. sharky12345

    Find value with criteria then copy row

    I'm using this to find a value in a range subject to criteria; Lastrow = Range("A65536").End(xlUp).RowFor Each cell In Range("A2:A" & Lastrow) Set r = Sheet4.Cells.Find(What:=cell, After:=[B1], SearchOrder:=xlByRows, SearchDirection:=xlPrevious) If Not r Is Nothing Then cell.Offset(0, 1) =...
  9. M

    VBA - return value in different columns upon a criteria

    Hi all, I would like to have the excel show the net income for each type of day as attached. <tbody> C D E F G H I J Expense_Weekday Expense_Weekend Expense_Holiday Income Net_Weekday Net_Weekend Net_Holiday Day 492 600 108 Sat 480 750 270 Mon 300 230 -70 Holiday...
  10. Johnny Thunder

    Vba Help - For Loop to enter Text into Cell - Excel 2016

    Hello all, I am working on a project and I have gotten fairly far with this and needed some guidance and possibly some revisions to my code to make it faster and shorter. Objective: 1. I have a Master Data Sheet (Ws2) that has 17 rows of data Columns("B:O"). Thru a loop on Column B, if the...
  11. Nelson78

    VBA: result with only one decimal

    Hello everybody. I need to display the result in cell (17, lc + 1) with only one decimal, but the following instructions don't work (the value remains with 9 decimals). Sheet1.Cells(17, lc + 1) = cell.Offset(0, 12).Value / cell.Offset(0, 8).Value Sheet1.Cells(17, lc +...
  12. Johnny Thunder

    Code is running SUPER SLOW

    Hi Group, I have finally completed my code that is currently looping on 641 Rows of data and its taking exactly 5Mins.... I know this doesn't sound too bad but it is taking waaaaay to long. I am looking for some improvements or for some modifications to shorten or help speed up what I am...
  13. F

    For Each cell In Range Copy/Paste Data to another Worksheet

    Hello, I'm having a bit of trouble fixing an issue I'm having and not having much luck googling the problem. I have a loop that searches for certain things. What I'm trying to do is have the row that the search is positive for print the value from Column A of that row into another sheet. I...
  14. 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 =...
  15. 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...
  16. R

    VBA Skipping Blank Records in HTML

    I have the following code that works for the most part, except when there is no "prcIsum" found within the HTML. In these cases, the code fails. I got this to work for the ".viSNotesCnt" column, but am having issues for the others. I want it to show as blank if there is no "prcIsum" or...
  17. sharky12345

    For Loop reverse order

    I'm using this to loop through a range of cells and grab their values for use later: For Each Cell In Sheet11.Range("J2:J20")If Cell.Value = "YES" Then Links = Cell.Offset(0, -8).Value & " " & Cell.Offset(0, -7).Value & vbNewLine & Links End If Next At the moment it starts at the bottom and...
  18. D

    Use Case statement to change colour of date

    I am looking to use a Case statement to change the font colour of a date: today's date, a date in the future and a date past. I have tried the following using Date Today and Now but get an error each time. 'Colour cells based upon value (column J) Select Case Cell.Offset(0, -2).Value...
  19. sharky12345

    Error 13 - Type Mismatch

    I'm getting an error 13 Type Mismatch on the following line but I have no idea why, if anyone can assist? If InStr(cell.Value, "P.T.") Or InStr(cell.Value, "Temp Gt") Or cell.Offset(0, 9).Value = "AP" Or cell.Offset(0, 9).Value = "A/Gt" <> 0 Then
  20. sharky12345

    Open each hyperlink in new IE tab

    I'm using this to loop through cells containing hyperlinks to websites and if criteria is met open that page; Application.DisplayAlerts = FalseFor Each Cell In Sheet11.Range("J2:J19") If Cell.Value = "YES" Then If Cell.Offset(0, 3) > 13 Then ThisWorkbook.FollowHyperlink Cell.Offset(0, -7)...

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