mycell

  1. M

    Issue with Vba Loop

    For some reason my loop is creating duplicate outputs. If anyone can help understand why, I would be grateful Sub IPutil() Dim LastRow As Long Dim LastColumn As Long Dim StartCell As Range Dim frow, lrow, fcol, lcol As Integer Dim rng, MyCell As Range Dim sh1, sh2, sh3 As Worksheet Set sh1...
  2. M

    VBA Error posting data using offset

    I'm trying to post data to another location in the same sheet using the Offset function but I keep getting "Runtime error 9, subscript out of range". The line that throws the error is the one that starts "Application.Worksheets . . .". Set rng = Range("J17:AA17") For Each myCell In rng...
  3. C

    copy range in respecting row

    I have data something llike this a b c d e f g h i j k l 1 2 1 1 1 10 21 23 32 34 43 45 3 11 2 0 22 33 44 4 12 3 1...
  4. D

    VBA to open form in PDF

    Greetings All - I have the below VBA which opens a Print Preview for each row on the "Agent Performance Scorecard" that has an "X" in column A. I'm needing to change it from Print Preview to opening in PDF instead. I've modified the code to open in PDF but it throws an error after opening the...
  5. E

    VBA Question

    Ive got a long list of data I had help with a tech running some VBA code for me and our data has changed a little and the code has broken. Basically my data changed from 515 to 515E or 515J and I am not sure where to repair this part of the code for it to function properly. This code sorts the...
  6. T

    Wrong attachment to wrong person

    i have this code: Public Sub pdfopslag() Dim myCell As Range Dim valRules As Range path = Range("I21").Text Set valRules = Evaluate(Range("A9").Validation.Formula1) Application.ScreenUpdating = True...
  7. J

    Cannot copy to the last cell in the range

    I have written a code to loop though range of cells and copy certain data in a column. But everytime I run the code it just copies the last record and not all of them. The issue is somewhere in the destination line of code where it can't find the last unused cell. Any help will be very...
  8. Skrej

    IF values not recognizing numbers

    I have the following code snippet which is supposed to check the values of some textboxes and dropdown boxes on a userform, in order to avoid duplicate entries. 'check for duplicates rng = Sheet2.Cells(Rows.Count, "E").End(xlUp).Row For Each MyCell In Sheet2.Range("E7:E" & rng) If MyCell =...
  9. R

    Problem with Pasting

    Good Morning, I seem to be having an issue getting the following to post. Everything runs fine until it gets to the Selection.Paste (Highlighted in blue) I've tried variations and the only time it will paste is if I add Selection.Cut but I need to leave the original data in place on the...
  10. Dreamteam

    VBA - Add New Worksheets & Name (from a list of cells)

    Hi all, First post and pretty excited... I'm new to VBA and I'm really just trying to learn it correctly from the start (whatever that actually means). I have a pretty straightforward piece of code that I have written - which works - and that's great. However, I am wondering if this is...
  11. S

    "AND" parameter for CASE STATEMENT??? WHEN, AND, THEN

    Sub Request2() 'THIS SUB: finds NONHAZ, UN2911, or UN3316 and if found populates No Action, No Error, or Compliant in columns AX:AZ ActiveWorkbook.Sheets("HazShipper").Select Application.ScreenUpdating = False Application.DisplayAlerts = False Dim mycell As Range Dim mycell2 As Range Dim...
  12. S

    macro to auto update with new worksheet name

    Hi all I have a workbook that i have developed that reports the number of document reviews due - either over due or future due.. A) within the workbook i have a macro (borrowed from the web) that creates a new worksheet for each business unit and the current reporting month (From a set...
  13. E

    Using variable (cell address) in Vlookup

    Dear experts, I hope you can assist me. I am using a variable called "MyCell", it contains the address of the cell 3 columns left of the activecell. This address is later on being used in the vlookup formula's however the outcome produces an error. When I use the Activecell.formula statement...
  14. B

    Looping issue

    Good evening, I am trying to loop through highlighted cells, to use the script below to anchor multiple cells within formulae: Sub ANCHOR() Dim MyRange As Range Dim MyCell As Range Set MyRange = Selection For Each MyCell In MyRange ActiveCell.Formula =...
  15. S

    Looping problem -

    Greetings Experts, I'm trying to look at the value of a cell in a range. In this case, the range is range("AK2", range("AK" & myLastRow) If the cell contains "L" input =IF(AL2=AJ2,TRUE, FALSE)) - 3 cells down (in "AN2") if the cell contains "KG" input...
  16. S

    If, elseif, else.... Next without for error

    Someone please, for the love of God, tell me what my code is missing so I can move on. I keep getting the "NEXT WITHOUT FOR error, and it won't run my macro. I know this has to be a simple fix, but I've been up since 5am... my brain is too fried to look up anymore answers. Thanks Excel Giants...
  17. S

    Multiple CASEs: Best Practices, Arrays?

    Hello and thank you for offering your help. I have 2 columns I have to compare and match. Cities and Airport Codes Each column is user defined (input by user, not pulled out of a static environment/system) which adds some tricky coding. 1. There are over 200 airport codes in this particular...
  18. S

    Loop 2 Ranges - "Invalid Next Control Variable Reference"

    In layman terms, what I'm trying to do: If "V2" = "A2" then "V2" = "True" Else "V2" = "False" Then proceeding to the next row in both ranges, all the way to the bottom of the data set. Sub Step6() Dim mycell As Range Dim myrange As Range For Each mycell In Range("V2", Range("V"...
  19. S

    ISEMPTY does not want to work properly. Someone help me out of this.

    I am looking to fill in blanks in the selected range with the word "Research" IF the cell is blank then cell = "Research" Simple enough, yet my mind is drawing a blank. The code below puts the word "Research" in the Header (U1), instead of in the blank cell. Something is missing, what...
  20. E

    Help inserting pictures with macro

    Hello, I am using the following code to insert a list of pics, it inserts a link to the pics instead of pasting the pics, can someone help Sub InsertPictures() 'Application.ScreenUpdating = False 'ThisWorkbook.Worksheets("CONTENTS").Visible = xlVisible Dim CONT As Worksheet Set CONT =...

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