0.value

  1. T

    Pasting Formats

    Hi I have the below code which copies a range data from a workbook and it works well. I just want to copy formatting such as borders and font colour etc. I have tried using .PasteSpecial xlPasteValuesAndNumberFormats as per below but it doesn't seem to work. = ws.Range("A1:A13").PasteSpecial...
  2. R

    An incorrect variable value is being written to a cell

    Hi all, my whole code extract is below and the highlighted bold red parts are giving me grief. Suddenly, last week, out of the blue, this error started cropping up. I need to determine whether a tour type is Coach, Rail, Air or Self Drive. I make this determination near the start of the code...
  3. R

    Help with retrieving data from multiple workbooks - VBA for an amateur

    Hello, Could someone please offer some guidance in the VBA code Ihave pasted below, Im definitely an amateur user who needs alot of help but ivemanaged to cobble together some code by joining other peoples solutionstogether. The VBA i have used works fine but I cannot figure out how to patchin...
  4. L

    Next Available Line

    Hi, Can this code be edited so it puts the data on the next available line? I sometimes need to delete some data. Thanks Private Sub CommandButton1_Click() Static xCount As Integer Application.EnableEvents = False Range("J3").Offset(xCount, 0).Value = Range("H6").Value...
  5. L

    Run Code From Button and Save As PDF File

    Hi, I have this code which runs when cell H46 is changed. What I would like to do is have this code run by a button instead which also saves the print area B2:H53 of this sheet 'Lookup Invoice' to a PDF file. Is this possible to do and if so how please? Thank you very much Dim xVal As...
  6. R

    Trying to set two variables as one variable.

    Hi all, I'm counting the number of PU's, which I've set as "PUdonk = 0" then later, "PUdonk = PUdonk + 1" Do Until Cells(ActiveCell.Row, "B").Value = "" If ActiveCell.Offset(2, 0).Value = "Rail" Then PUdonk = PUdonk + 1 "PU" & PUdonk = ActiveCell.Offset(1, 0).Value...
  7. J

    For each and If with worksheet function

    Trying to find time gaps based off each cell and its offset (the next cell down) in a dynamic range. My error message right now is 'object required' in the if statement. For Each cell In picks() If WorksheetFunction.Abs(cell.Offset(-1, 0).Value - cell.Value) > 0.02083 Then do something ElseIf...
  8. S

    Original "start date" of postponed appointment

    Hello, Hopefully someone could help :) I use VBA code that runs through Microsoft Outlook Appointments, and for each appointment - prints a few details - to an Excel table. If I set the start date of an appointment on "01-April-2019", and then postpone that appointment to "12-April-2019"...
  9. Z

    Macro_Loop

    Hi, I have set of goals for each employee and I need to set 5 loops to include them, below is the macro that went through one goal. I need to set loop to go through all the 5 goals, how can I do that? Thank you!
  10. K

    Set Worksheet name from Variable?

    Hi All-- I have a userform that pulls data from 4 different worksheets. I set specific labels to these data values. Each of the 4 worksheets is set up exactly the same, so Range("C:C") on one is the same on another, so I want to use a single module to run the code 4 times. Sounds simple...
  11. W

    Relative Strength Indicator. (UDF -vba)

    Afternoon - I searched the forums and couldn't come up with anything, but I'm wondering if anyone could help modify this code that I found on another site, so that it would take into account the average of one of the functions of the previous cells. Effectively, I'm trying to modify this code...
  12. M

    Get only the latest email in Outlook and copy to excel.

    Hello, I'm new in Excel VBA and I'm trying to get only the Outlook's latest email body,sender, and subject and copy it to excel but my code is getting all the emails from today. Sub GetDataFromOutlook() Dim Outlook As Outlook.Application Dim OutlookNamespace As Namespace Dim Folder As...
  13. D

    Search in multiple sheets

    Hello, I have this code which works perfectly if active sheet has needed search value, otherwise it's an error. How to adapt this so it searches thru more sheets instead. Thanks The code is in plan report workbook, looking a value from weekly plan workbook and searches withing plan report...
  14. M

    VBA Row offset when dynamically changing cell value

    Hello I have got a spreadsheet that with through various help from this forum is working perfectly. I am now in the process of 'improving' it. Here is how it works: I have a 'data sheet' that is 294 columns wide, and contains lots of data for football matches. My spreadsheet currently goes...
  15. G

    VBA- Clear Dropdown List and Start in 1st Postion

    Hi All you Guru's, I need a little help. I have 5 Dependent drop down Lists. Created from the Data Validation. I would like to reset the selections once the user decides to do another selection. I created this code below. The idea is the if the user makes the 5 selections and if he chooses to...
  16. H

    Extract Email From Outlook Using Excel

    Hi all, I have the below code to extract emails from a particular contact in outlook (inbox) and from a particular date to now. The highlighted line of code is the problem. Here is the code I have so far: Sub GetFromOutlook() Dim OutlookApp As Outlook.Application Dim OutlookNamespace As...
  17. V

    VBA Help - Inefficient Code

    I have this code I created that loops through lines of accounting data and moves offsetting lines to another sheet in the workbook called "Cleared." It works for the most part but after about 180 lines it starts to slow down and then almost comes to a complete stop. I created an absolute value...
  18. M

    Assign task from excel

    Hi, I've been trying to get a code together for sending a task from an excel sheet to someone via outlook but can't work it out. I've found a couple of codes on here but keep getting errors. Can anyone help me out? Sub tasksend() Dim objOut As Object Dim objTask As Object Dim strbody As...
  19. D

    Import emails from outlook via Excel VBA

    I am having a problem trying to retrieve from mail from Outlook into Excel via VBA. I used the following code (the names of the shared folders are obviously not the real names), and it retrieves all of the mail, but only the first line of the body of the email rather than the entire message. Can...
  20. H

    Staement If...Or

    hi! can,t solve this, Sub GotoMytext() If ActiveCell.Offset(3, 0).Value = "AKTIVITETER" Or ActiveCell.Offset(5, 0).Value = "AKTIVITETER" Then 'if one of them is true then I wnant to select/go to that cell End If End Sub

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