code

  1. V

    Remove Column if Blank

    Hi and thanks, pls check the following sheet, want to remove all the blank column Excel 2010 32 bit BCDEFGHIJKLMNO 1NameAttend 1Attend 2Attend 3Attend 4Attend 5Attend 6Attend 7Attend 8Attend 9Attend 10Attend 11Attend 12Attend 13 2JohnPPP 3PPP 4PPP 5 6RaghuPP 7PP 8PP 9 10MattyPPP...
  2. D

    Loop VBA and increase values in the code

    Hi there, it has been a few years since I last posted. Is there a way that I can loop the following code 27 times, and each time it loops I want to increment every instance of DirectDebit in the code, i.e. DirectDebit01, DirectDebit 01n etc - loop - DirectDebit02, DirectDebit 02n etc - loop -...
  3. E

    VBA Target.Address for multiple cells

    Hello, I have the below code that works perfectly if you enter/copy data one cell at a time. But I copy/paste multiple cells all the time, at which point the code below gives me an error. Is there a way to adapt the below code to work with multiple cells changing at the same time? Private Sub...
  4. V

    Declare a variable to a cell

    Hi everyone! I've been stuck with declaring a variable to a cell value and need some help. Situation: I have a code that filters a table and transfers the filtered data to another sheet. The filter could be the date value but I can't set it properly. The result is always Error 1004. I've tried...
  5. S

    Including LastRow within a formula

    Hi All, I have some code which creates a "score" line within my spreadsheet. I need this formula to change each time I run my macro, as the number of questions it relates to is variable. I have the formula: Range("B" & LastRow + 3).Value =...
  6. L

    VBA PasteSpecial method Worksheet class failed

    Hello everyone, I have a code which starts this: Private Sub CommandButton1_Click() Dim destination As Worksheet Set destination = Worksheets("STATS") Set myIE = CreateObject("InternetExplorer.Application") myIE.Navigate "https://www.internetpage.com/lblabla.html" myIE.Visible = True...
  7. B

    VBA Challenge! How do i save the fidelity of a VBA Hyperlink?

    Hello everyone I would like to thank you all in advance for your kind help, I have a good working knowledge of excel, BUT I am rather new to VBA and I could really use some of your help. So I was able to create a simple formula that looked at cells Sheet2 A8 and B8 to create a hyperlink in C8...
  8. willow1985

    VBA Copy visible cells as a picture

    Hello, I have a macro that filters column Q removing blank cells. Once it is filtered to show only the cells with data I am looking for a code that will copy all visible cells from Q2 down and copy them as a picture. Any idea what code I could use? Thank you for all your help! Carla
  9. D

    How to copy multiple rows using If

    Hi all, I'm very new to VBA and have written this simple code to copy certain cells if a certain cell within that row contains any data. I need to replicate this for the 19 rows beneath this. Do I need to Keep writing the same code for each row or can I write a code to cover all the rows...
  10. G

    Find a 7 character code in text strings of varying length

    Hi, I've a list of item paths, each with a product code in them. The product code is always in the format AAA1111, but it's in a different place in each string, and each string is a differing length. Can anyone think of a forumla that will extract that 7 character code? I have 6,500 lines so...
  11. P

    Replace and Find VBA code for a command button

    Hi goodmorning all, hope you can help me place I have cells which sometimes has forexample -1, -4, -3 in them the range is cellsB24:P39, so what I do at the moment manually is CTRL F (find and replace) clickon replace tab – in find what enter (-*) and in replace with enter (0) thenreplace all...
  12. H

    VBA - User Form show at start of macro & hide at the end

    Hi, I have a user form(UserForm1) which I want to show at the start of the maro & hide at the end i.e. when the macro/code is completed. The purpose for this is that some codes do take few seconds to complete so I would want a user form (stating some text like the macro is ruuning - pls wait...
  13. Y

    VBA INDEX MATCH Application to display value in Textbox

    I am trying to use Index Match to replace Vlookup Function so my textbox displays date format. If I use Vlookup my textbox shows numbers. I tried the below code but it is not displaying the value in the textbox once I run the code. Can I please have your help to make the code work? Dim TBL As...
  14. A

    Select and Print Only Cells with Values

    Hi, newbie to VBA here. I have been researching and trying many ways to select and print a range, and I cannot find a way to print cells with values only. In my case, I create a list of entries through the day. I am creating a button so I can print all of these entries at the end of the day...
  15. N

    Deleting Columns Faster

    Hello all- I am running a line of code to delete multiple columns of unneeded info, this is what i am running: Range("A:B,H:H,J:AD,AG:AK,AN:AX,AZ:BJ,BL:BN").EntireColumn.Delete Is there a way to run this code and make it go faster? I have a timer on for this line and its taking between 9...
  16. G

    On Error GOTO Quit

    On Error GoTo Quit: Quit: MsgBox ("Please Add Data to Template Sheet" _ & vbNewLine & "Then Run Program") Hello All, I have the above code. The On Error GoTo Quit is at the top of the code, with the Quit: at the bottom. The problem is my message box keeps popping up, even when no errors...
  17. kelly mort

    My smart tweak ended up crashing excel- I need expert advice and fix

    I have a table layout as below, it used to work with the code below until I inserted the column under “M” then replaced all 12 with the 13 you see in the code. For i = 2 To 13 And rCell.Offset(, 13).Value = Rnk & GetOrdinalSuffixForRank(Rnk) I was thinking that will fix...
  18. I

    Quick Help

    Hi friends, Can someone help me with working out a formula for the below, my head is hurting from getting wrong a few times. Column A is a Yes or No Column B is a number 1 to 4 Column C needs to be a formula that returns the following "Code 1" if column b is 2 and column a is yes "Code 2"...
  19. B

    Conditional change: Change value in a cell based on specific text (ending in "X") in another column

    Hello Board, I am new to board and dumb, hoping someone would share a simple VBA code I have a large table of data of ~10000 rows. I'd like VBA Code to loop through: 1) evaluate data in column A for cells that contains 5 characters ending in letter "X" 2) If it finds such, I'd...
  20. I

    Code to work to specific row and not whole row

    Afternoon, Working code in use shown below. Currently this code operates the whole of column B where i would like it to stop at the last row. So currently my last row with data in is row 19 BUT then i also see the message if i type in row 369 where at present its empty. Basically find last row...

Some videos you may like

This Week's Hot Topics

Top