cellsi

  1. 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...
  2. E

    Insert Image Path and Dimensions Returned

    I am trying to be able to insert the path to an image, and have the dimensions and other attributes of the image returned in a cell. I am able to get the dimensions of all the images located in the specified folder when running the macro below: Sub Dimensions() Dim sFile As Variant Dim oShell...
  3. G

    Adding additional criteria to formula causing an error

    Hello, I have the following formula which functions correctly, however i wanted to add an additional criteria which is causing an issue. Cells(i, 20) = WorksheetFunction.CountIfs(ThisWorkbook.Sheets("Adviser data").Range("A:A"), Cells(i, 1), ThisWorkbook.Sheets("Adviser data").Range("d:d")...
  4. C

    Selecting The Last Cell containing specific text doesn't work

    Hi! I am trying to select the last cell in column A that contains numbers with the thousand separators eg 1,234,567. Previously in one of my other codes I used "*#,#*" but here it does not seem to work. If I write anything instead it perfectly finds it but not like this. What am I missing...
  5. M

    how to send only 1 attachment which is in excel cell by vba

    HI i have encountered this below error. i have for example 5 email id, name and attachment path in excel file. i want to send email to them with attachment . this below code does not pick up attachment . Please guide me Set OutApp = CreateObject("Outlook.Application") Set OutMail =...
  6. K

    Object Error

    Hi Everyone, I am having trouble on two fronts with this code. First it doesn't like ("Sht") so the person can identify which sheet to activate. Second it doesn't like the erow statement. Dim Sht As String Sht = InputBox("Please enter the period name") Worksheets("Sht").Activate...
  7. A

    VBA Code / File not found error

    Hello. I have a VBA that is pulling files out of excel and creating emails. I have an extensive master list with potential files, which may or may not be found on a given week. My issue is, when it runs, if it cannot find one of the files, then the module stops. Is there a way that if a file...
  8. A

    Remove Row in two columns in two ranges VBA

    I am trying to write a macro to remove rows with a cell value of zero in Range H4-H1003 and I1004-I2003. Can anyone help with this? Sub Remove_Empty_Cells() Dim ws As Worksheet, last As Long, i As Long For Each ws In Worksheets(Array("JE")) ws.Activate last = Cells(Rows.Count...
  9. G

    VBA for mulitple if statements

    Good morning, i am trying to get the following code to work, have tried various combinations of if ,or, else, elseif but to no success. I have not copied all the statements , but effectively what i am tying to do is. i column 6 (f)is between 1 an 8 it completes the relevant sum. If greater...
  10. N

    VBA script making me crazy .... send email based on excel sheet contact list

    So we finished our budget for 74 departments. And I m the one who is sending individually to all. I had a vba code to send these to different people. I have been using vba code to create emails for all of the recipients. This time there was a standard word file which I was supposed to send as...
  11. B

    Lookup in other sheet VBA

    Hi I have the codes to perform the following: 1. I have data in sheet1 2. I have a range of numbers in sheet3, from A1 to A10 3. If the data in column1 of sheet1 matches to that in A1 to A10 in sheet3, then add "S" to the end of the data in column27 and then make column26 the same as column27...
  12. C

    FIFO P&L calculation

    Hello guys, I was looking for FIFO profit and loss calculation and despite many FIFO subjects (mostly calculating stock value), I ended up starting from scratch, which I usually avoid.. two subjects helped to understand, but I coudln't have it work for my-self. This UDF couldn't work ...
  13. C

    FIFO P&L calculation

    Hello guys, I was looking for FIFO profit and loss calculation and despite many FIFO subjects (mostly calculating stock value), I ended up starting from scratch, which I usually avoid.. two subjects helped to understand, but I coudln't have it work for my-self. This UDF couldn't work ...
  14. V

    Dynamic msgbox base on blank cell

    I've designed excel file for showing pending task. I want msgbox dimension to fit with only rows which have blank cell on column "F", but msgbox dimension is fit with 100 as i in my code Sub Pending() Dim r As Long Dim msg As String, i As Long, a As Variant msg = "" For i = 2 To 100 For Each...
  15. V

    Re: Runtime error 9 - subscript out of range error

    Re: Runtime error 9 - subscript out of range error Hello All I hope you can help on this please Re: Runtime error 9 - subscript out of range error on the code below that is bold [Lastrow = Sheets("data").Cells(Rows.Count, "I").End(xlUp).Row For i = 2 To Lastrow If Cells(i...
  16. A

    Looping Through auto-filtering values

    Hello all, I have two spreadsheets, one containing user IDs ("Report1") and one containing every information we have about the user with that ID "MASTER_Detail_18.07.2018". I have created a VBA macro that takes a specific ID ( hardcoded) and uses it as a filter in the...
  17. B

    Transpose Columns To Rows And Insert New Rows To Fill Down Data with VBA

    Hello Guys, I want to transpose data with 5 Columns to only 2 and a new row should be created for every column. Source Data: <tbody> Berlin 1000 2000 3000 4000 5000 Dresden 500 300 300 300 300 </tbody> After the macro, the data should be transferred to this result: <tbody> Berlin 1000...
  18. K

    Copy and Paste Problem

    Hello Everyone, i'd like to copy the entire last row of a sheet called ("HL_1") and pasted it to another sheet called ("HL_COMBINED"). I should also point out that they are both table formatted. the code i'm using is below, but it's just not working. any assistance is greatly appreciated...
  19. N

    Multple Worksheet Tabs to form One list

    So I have 18 different tabs in which have testing data on them in the same format for each worksheet. For example, Testing Sh 1, Test Sh 2 etc. My data that I need is range C2:C22 on each sheet and I want to take this range and form one long encompassing list. So far I have this but it isn't...
  20. L

    concatenate in vba

    Hi I am trying to concatenate the first 10 cells in A, and B columns and put them in C. So I did this program which did not work. Any help would be very much apprecaited. Sub concat() Dim i As Integer, j As Integer For i = 1 To 10 For j = 1 To 10 Cells(i, j + 2).Value = Cells(i, j).Value &...

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