vba & excel 2010

  1. montecarlo2012

    vba for next

    Hello People. Sub Monte_Carlo() Dim i As Integer For i = 2 To 16 Cells(i, 1) = i + Range("A1").Value - 2 Next End Sub This is the result I got, but it is not what I am working on. Expecting result is: Please give me a hand here. Thank you for reading this.
  2. P

    HELP!! cant figure this out (6 hours still going)

    ok to start off with ,, thank for taking the time here to read this ive litterally been learning vla for 24-48 hours and im stuck with a few things i wondering if i could pick your brains to help soo.. ive attached a spreadsheet where im wanting to add a new line after pasting to my database...
  3. L

    Complicated Cell Formula to VBA Formula

    Explanation: There are 4 Sub-inventories an item can be found in*. Staged to load (STG), International (INTNL/FGINT), an over-flow warehouse (PARG), or in the racks (FG). An Sales orders are labeled International (Open Orders 1 sheet Column E), and the the Status of the order can be found in...
  4. J

    Combine all text in text files and save the file with a given name in new folder

    Combine all text in text files and save the file with a given name in a new folder A. Location of multiple text files is from column A2 cell rows separated by a comma. B. New file names are given in column B cell rows C. Now save the file in a given folder location in column C Cell rows. D. Some...
  5. tlc53

    Speed up VBA Code to Hide Rows

    Hi there, This VBA code has been super useful in many spreadsheets but on this occasion, it is running very slow. It takes 10 minutes to complete! The reason is that my range is usually only about 15 cells but now it needs to check 100 cells. Is there any way to improve/speed up this code...
  6. tlc53

    State Page Number of Department Total

    Hi there, I'm not sure the best way to go about this. I have totals on one sheet and the breakdown is on another sheet. Next to the totals, I want to state which pages they should refer to for a breakdown of that figure. Sheet: SkyCity Invoice A21:A120 Contains Department Name Sheet: SkyCity...
  7. tlc53

    Alter VBA code to get Category & Criteria from different sheet

    Hi there, I have the following code which works perfectly in my original spreadsheet but now I want to adapt it to work in my new spreadsheet. I had help writing this code so I'm a little unsure how to change the coding. It's the last bit of the code I want to change - .FormulaR1C1 =...
  8. W

    Excel - date format issue in vba

    I am using below code in my userform in order to put todays date by default. The below code sets the date in the given format in my textbox :- Private Sub UserForm_Initialize() txt_date.Value = Format(Date, "d/m/yyyy") End Sub But when I click Add data, then in the sheet1 the Date column is...
  9. montecarlo2012

    [vba] looping array

    Hi, I am trying to loop through a dynamic array B2:G and results on M:V and this is what I tryed. Sub Monte_carlo() With Range("M2:M" & Cells(Rows.Count, "B").End(xlUp).Row) .FormulaR1C1 = "=IF(RC[-11]="""","""",IF(MOD(RC[-11],12)=0,""E"",""P""))" .Value = .Value End With With Range("N2:N"...
  10. N

    File name suggestion to read only workbook when save as dialog box pops up

    Is there any way, using VBA, to set the file name in the save as dialog box when the user exits the workbook or selects the save/save as via the File menu, The workbook is protected as read only and the save as dialog box automatically pops up as a result; however, I want to have a filename...
  11. tlc53

    Skip running VBA depending on sheet name

    Hi there, I have the following code which runs on every sheet of my spreadsheet and there are 167 sheets in total; Sheets(Range("A164").Value).Select ClientNarrative HideRows PrintSetup Sheets(Range("A165").Value).Select ClientNarrative HideRows PrintSetup Sheets(Range("A166").Value).Select...
  12. tlc53

    Automatically arrange tabs in alphabetical order

    Hello, I'm wondering, is it possible for a VBA code to automatically sort the tabs by alphabetical order? It is quite a large spreadsheet, with 42 tabs. The first 3 tabs shouldn't be included when they are sorted. These tabs are called; - Dashboard - Invoice Data - Client Details The tabs...
  13. H

    Delete Multi selected rows

    Hi i have a code below and i want manually selected rows all at once to delete however if i have the 1st msgbox then it just says no rows selected Sub deleterows() Dim i As Long, irow As Long Dim oSel As Range Dim answer As String Set oSel = Selection If oSel.Areas.Count <= 0 Then 'if i...
  14. H

    Still be able to send blank email with no data

    Hello I have an workbook whereby it has all the expiry dates and you can filter the each department which is on sheet2 filtered from sheet1 and show you any due dates for the selected department if there are any due dates and can send email based on filtered dates however problem is that...
  15. H

    Run-Time error 6 Overflow

    Hello i have got code whereby i get can error overflow on the line If i = 100 Or i = r.count Then Exit For and if i change to this If i = 100 Or i = r.CountLarge Then Exit For then it works however then it is only copying the first row which is the title only. can someone help me please BTW...
  16. H

    copied data overwriting on last row instead of next blank row

    Hello everyone i have got the code whereby it copies from Sheet 2 and then pastes onto the sheet 3 blanks rows however problem is when there is a value e.g. 4 rows as got value it will overwrite on the last used row which is 4th row instead of pasting on to next available blank row. can someone...
  17. H

    image hyperlink inserted from User form wont open

    Hi i have got userform whereby user select the on the image and it changes to hyperlink and add the hyperlink to a cell however when tried opening the hyerlink it wort open, can someone point me in the right direction please. Private Sub CommandButton3_Click() On Error GoTo errHandler...
  18. H

    Image hyperlink wont open

    Hi i have user form whereby code below placed in command button whereby user can select the pictures from their driver and and it will upload a hyperlink on the sheet Column "I" however when try to open the hyperlink it says "Cannot open the Specific file" can someone please help me where m i...
  19. H

    excel to send email when all dates in column are due

    Hi I have an staff training record whereby in column F-Z starting from row 9 with the expiry date and in column A9 onward all the staff name and type of training in columns F9-Z9. i want macro to send email with the all the Due date in each column to One send email with the name, due date and...
  20. H

    change the font color in listbox user form if theres a value in counter 9

    Hi i have userform with the listbox and is it possible to change the color of the value if found in listbox below it is the code of the list values. i want Next .AddItem .List(counter, 0) = sourceCell.Offset(0, 0).Value...

Some videos you may like

This Week's Hot Topics

  • SUMPRODUCT active link formula
    Hi guys i have sumproduct formula for counting two range of number, i want count active cells of formula that linked to another sheet...
  • Block certain cells in condition met in cell A
    Hi there, trying to figure out step by step how to build macros and learn more. Now given that my other code was a mess, I figured I would...
    Hi, Below formula works well, =(INDEX('PRICE LIST'!$C$7368:$C$7679,MATCH(1,(WORKSHEET!O28='PRICE LIST'!$A$7368:$A$7679)*(WORKSHEET!P28='PRICE...
  • Match data from 3 columns to return data from the correct 4th column
    Hi there! I'm trying to have a cell auto-populate the data in a cell based on the data entered in 3 other cells. I've pasted a copy of the...
  • VLookup
    Hi everyone, I need to find the value from one sheet to another. So in Sheet A Field N5 I have a value (Spark) I want to find Spark on the Sheet...
  • Defining a range
    Private Sub Worksheet_Calculate() Dim Xrg As Range Set Xrg = Range("K1") If Not Intersect(Xrg, Range("K1")) Is Nothing Then MsgBox...

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