cellsx

  1. B

    Inserting Multiple Rows In Very Large Worksheet

    Hoping someone might have some thoughts on optimizing the code below. I am inserting 5 rows each time a new employee is found. Then adding the text for the pay category. I have done some research and was wondering if "Resize" may be a viable option. Thanks, Bob X = 2 Do Until Cells(X...
  2. B

    Deleting certain rows in 95,000 row worksheet

    I am using the code below to search cells for certain criteria and then keeping certain rows and deleting certain rows. This code currently takes around 1 hour to process 95,000 records. I need help in determining if there is a better way. Thanks, 'Delete Level 1's and certain Level 2's X =...
  3. A

    If and End with

    Hi everyone There is an error 'End if without block if' with the code below: Please could anyone help. Sub RemoveRows() Sheet1.Select Dim x As Long,LastRow As Long LastRow = Cells(Rows.Count,"A").End(xlUp).Row For x = LastRow To2 Step -1 If Cells(x,3).Value <> "FASS"...
  4. G

    Multiple attachments to send in outlook at one shot

    Hi everyone, Here i am trying to send multiple attachments at one shot but as i compiled and check its exiting at the point of attachment at the send time Any one suggest me with what changes i should do???? Here is my code Sub Mail() Dim myApp As Outlook.Application, mymail As...
  5. L

    left() in vba

    Hi I wanted to do the code below without using for-loop, but it did not work. Is it possible to do it without For loop? Thank you so much. Sub myleft() 'For x = 1 To 10 'Cells(x, 2) = Left(Cells(x, 1), 2) 'Next x ''''''' Range("b1:b10") = Left(Range("a1:a10"), 2) End Sub
  6. J

    .Range(.cells(x,y)).select not working & hyperlink help

    I am having trouble with 2 issues (don't know if 2nd one was fixed because I haven't been able to get past runtime error '1004': Application-defined or object-defined error Here is my entire code: Sub loanDisbursementNotification() Dim lr As Long, x As Long, y As Long Dim strHeader As String...
  7. H

    Compile error wrong number of arguments or invald property assignment

    Am getting that compiler error on this very simple code: Sub app() finalrow = Cells(Rows, Count, 1).End(xlUp).Row For x = 1 To finalrow If Cells(x, 1) = 50 Then Cells(x, 1).Interior.ColorIndex = 3 End If Next x End Sub I wrote 10 numbers in column A including a "50" so it could turn red. I...
  8. Jak68

    Macro for scanning QR codes

    Hi, I have a spreadsheet with a few hundred items on it and these items are occiasonally getting sent out and then returning to me and I want to to book them in and then out so I know what is happening. I currently have a tab with all of the items on it and then I have created a new tab for...
  9. E

    VBA Create Email Links

    So the table below spans columns A-G <tbody> Situation Date Originating Agency Lead Assisting Summary Email List 1 Jan 1 TCHC ODSP TPS Summary goes here emai1@email.com 2 Jan 1 TESS EMS TCHC Summary goes here emails@emails.com </tbody> I have a button that creates email links in column H...
  10. L

    programming style - printing 4 columns instead of 1

    Hi The code below is to print colorindex code (from 1-56). It works fine but I want to print these codes into 4 columns (each has 14 cells). I know I need to break the For-Next look when x=14 but I do not know how and I would like to learn from your style how that can be done. I am thinking to...
  11. B

    VBA, Date changes when box is checked

    Hi, I have been working with an Excel file to send automatic mail based on some criteria and change dates when the ActiveX check box is checked. Condition: If I check the box, 'TRUE' is displayed in the adjacent cell. If TRUE, the current date has to be added with numbers (7, 30, 120...
  12. L

    programming style question

    Hi I have a simple UserForm. It has 2 textboxes (myname, myage) and 2 option buttons (male, female) and 1 control button (enterme) . Please see the code below. What I want to add is to give a user a message, if the user forget to enter Name, age, and sex and hit Enter button. So I came with the...
  13. I

    Add a value and an offset value

    Hello, Trying to loop through the B column and when there's a certain string I want to enter a fixed value in column H, but when it's case REGULAR DELIVERY PV I also want to add the value of the j column to the fixed value. I know I need to do an offset but my code doesn't seem to work. Please...
  14. I

    VBA Case Select Multiple Conditions

    Hello, I'm trying to do a case statement in VBA. If the value in J is >= 200 AND <300 I want it to say in O REGULAR DELIVERY PV, when >= 300 AND <400 I want it to say REGULAR DELIVERY PV300, and when >= 400 REGULAR DELIVERY PV400. This does not work. Sub VolumeChange() '...
  15. I

    Leave cells blank case statement not working

    Hi, I'm trying to loop through each row in column c to look for a string, if that string is there I want it to enter a certain price in column H, otherwise I want to leave the data currently in column H untouched. My code sort of works but seems to delete the data in H during the loop. Please...
  16. I

    Leave cells blank case statement not working

    Hi, I'm trying to loop through each row in column c to look for a string, if that string is there I want it to enter a certain price in column H, otherwise I want to leave the data currently in column H untouched. My code sort of works but seems to delete the data in H during the loop. Please...
  17. G

    COuntifs Then

    Hi, i have been trying to get the following to run, but keeps erroring, effectively if value in range (x,25) is contained in Range "i;I") i want "NA Protection" in (X,18), othereise blank FinalRow = Cells(Rows.Count, 1).End(xlUp).Row For x = 2 To FinalRow cells(X,18)= If...
  18. L

    using the same variable with its value in 2 different sub

    Hi I want to use the value of variable s in first sub and in the second sub. I do not want to ask user to enter number of students again in the second sub. I asked user to enter number of students in sub1 and assigned this value to "s". So if user enter s=10 then I need to use the same value...
  19. P

    variables declared public won't pass value to another userform

    I can't figure out what I am doing wrong. I thought if you declared a variable as public, it could be used anywhere within the workbook. Not so in this case because none of these public variables declared will pass their value. So what I am doing wrong? Any help will be greatly appreciated...
  20. J

    Need help inserting a loop into another loop

    I have two pieces of working code that I was able to get working based on some things I've found online and some modifications I made myself (I'm new so I'm sure this code looks gross to most of you lol). I'm getting a Complie error that says "Next without For". I'm not sure how I properly...

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