long

  1. V

    If Elseif else statement

    How to write a VBA code to get the below output. If Column A = Internal, Then column F = ok and If Column C = Long or Short Then column F = ok and if Column A is anything else, then it should check if Column C = Long or Short if yes then column F = ok else column F = check. Thank you in...
  2. D

    Another day another wrinkle- Choose last instance of phrase and delete rest of rows

    My latest quandary, My file I copy to draw data from is data run everyday. The file runs a new instance anytime anything is added and a row is added with all the data plus the additional information. The file is at 95,500 rows right now . I am trying to parse by ID, then by status,and then by...
  3. D

    Move row then delete blank

    Hi all, could someone help me mod this to delete each blank row after it has moved the data to another sheet. Currently, it works when there is only one "Y" marked row but, if there are multiple rows, it does not delete any of the blank rows. Sub Move_Closed()Dim Check As Range, rng As Range...
  4. D

    VBA mod

    Hi all, can someone help me to mod this so that when the rows identified are moved to another sheet the subsequent blank row is deleted from the source table, please? Sub Move_Closed()Dim Check As Range, r As Long, lastrow2 As Long, lastrow As Long Application.ScreenUpdating = False lastrow =...
  5. M

    How to display these combinations

    <colgroup><col span="2"><col span="2"></colgroup><tbody> 0 0 0 0 1 1 1 1 2 2 2 2 3 3 3 3 4 4 4 4 5 5 5 5 6 6 6 6 7 7 7 7 8 8 8 8 9 9 9 9 </tbody> Code: Function ListPermut(num As Integer) 'Permutations without repetition Dim c As Long, r As Long, p As Long Dim rng() As...
  6. P

    Macro Not Shown with Alt+F8

    I created a macro in my Personal.xlsb but it does not appear in the macro window when I hit Alt+F8. All my other macros show, only this one does not. The macro runs just fine from the VBA editor. Sub DeleteColumns() Dim ColAry, i As Long, fc As Long Application.ScreenUpdating = False ColAry...
  7. H

    Copy Header Row to Each Sheet

    I'm using this code to copy data from one workbook into another, with the data broken out onto separate sheets. The only thing that doesn't copy is Row 1, which has the headers. How do I copy that row onto each sheet? Dim Lastrow As Long, LastCol As Integer, i As Long, iStart As Long, iEnd As...
  8. S

    CDate

    Greetings, I have a I column of values of the format " Aug 30, 2018" and so on. I would like to be able to convert these into the format "MM/DD/YYYY" Dim A as Long, LastRow as Long LastRow = Cells(Rows.Count,"A").End(xlUp).Row For K = LastRow to 1 Step -1 CDate(Cells(K,"A").value) =...
  9. S

    VBA Macro Start to finish way to long

    I have made this vba macro up but when I use it it makes my files double in size when I save it. I would like some help making it shorter but I dont know were to start. Sub Move_Final_to_JBA()Dim SheetName As String Dim wkSht As Worksheet Dim sh1 As Worksheet Dim sh5 As Worksheet Dim i As...
  10. T

    UDP listen does not read (TCP works fine)

    Hi UDP listen does not work, anyone can se what I am doing wrong ? (I have googled around but failed anyhow :-) ) I have copied most of the code below from internet, it worked with TCP, the only thing I have changed for the UDP listen case is that I replaced the two lines of the TCP part with...
  11. J

    Runtime 91 in autofilter.sort.sortfields

    I'm running into an issue with a sort command, that I'm sure I'm missing something simple and just overthinking.... any help appreciated figuring out what went wrong. Using Excel 2016. Public Const EnrollmentCol As String = "AF" Sub ImportSort() Dim CompleteWBFullName As...
  12. A

    .Find Type Mismatch Issue

    Aloha all! I've ran into a Type Mismatch Error when trying to 'set the last row' of a sheet. What I've done was create a separate public function that the original code should use. However, when it goes to the public function, the error arises. What I was hoping was the public function would...
  13. T

    Compile Error after upgrading form Office 32bit to Office 64bit

    Okay here is the issue. Where I work we updating Oracle SmartView to 64bit but before we do that we have to uninstall MS Office 32 bit and install office 64 bit. I did that and now when he opens the spreadsheet he gets the following message "though Compile error: The code in this project...
  14. N

    VBA Excel UserForm Maximize Minimized Size Drag Control

    Hello, I got the following code to maximize, minimize and resize the form, but it didn't work well, every time I ran it, I got a popup msg "Sub or Function not defined" and highlight "GetWindowLong" Note: I have 64bit system, so I added "PtrSafe" to the "Private Declare Function" but keep...
  15. D

    extract data change and update changes back to data sheet

    Hi all, I have a code o extract data (works perfect) I now am trying to paste that data back to data sheet if changed. I have a command button I have attached below code, when I click I get msg "Compile error: Wrong number of arguments or invalid property assignment" Sub Pre_Alert_Update()...
  16. N

    Paste data from old listobject to new

    I am trying to paste data from old listobject to a new listobject and have come with this sub: Sub san_import(owb As Workbook, nwb As Workbook, sha As Worksheet, lis As String, col As Long, res As Long) Dim orng As ListObject Dim nrng As ListObject Dim r_fix As Long Dim c_fix As Long With...
  17. P

    Date help

    Hello. I am copying dates to another sheet then after pasting it shows long date but when trying to filter it it still shows long dates. I can't filter it with years..but I cant find it even changing format to dates. Please help.
  18. D

    Listbox values from userform in one cell in a worksheet

    Hi all, I try to find the code that would allow me to put the values of a listbox from a userform in one cell of an excel sheet. Below For b = 0 To ListBox2.ListCount - 1 With Cells(5, 24) .Value = ListBox2.List(b) End With Next Or Dim arrItems() Dim cnt As Long Dim I As Long...
  19. W

    if..then..else error vba

    Hi Anyone able to help me debug my code below? it kept prompting me compile error: else without if where did i make a mistake? Dim s As String Dim r As Long Dim c As Long 'set active sheet Set ws = ActiveSheet 'finds the last row lstrow = ws.UsedRange.Rows.Count c = 2 For r = 1 To...
  20. G

    My macro not working

    Hi I have the following macro and wondered what ive done wrong as its not moving data when there is data with word "fare" in column E. Sub MoveData() Dim ws As Worksheet Dim lr As Long, i As Long Application.ScreenUpdating = False Set ws = Worksheets("Sheet1") 'Data Sheet lr =...

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