vba & excel 2010

  1. S

    Move only the columns where user has selected "Yes"

    Hi, I'm trying to figure out a code where when clicked on button macro should import the column header and based on drop down list if user selects yes infront of the column header it should import only those columns. Attaching below the snippet as well on what I'm trying to achieve
  2. montecarlo2012

    vba adding across columns

    Hi All. working on: Sub Add_acr_col() Dim Cl As Long For Cl = 2 To Cells(Columns.Count, "B").End(xlUp).Columns Cells(2, "A").Value = Cells(2, "A").Value + Cells(2, Cl).Value Next Cl End Sub simple and short...
  3. montecarlo2012

    vba. If Cell = Range("A1") do not work.

    Hi All. Working on: Sub sheet3_val() Set rngData = Sheet1.Range("B2", "B2902") m = -1 For Each cell In rngData If cell = 25 Then Sheet3.Range("D2").Offset(0, m) = n n = 0 m = m + 1 Else n = n + 1 End If Next Range("B9").Formula = "=COUNT(C2:WAK2)"...
  4. montecarlo2012

    vba counting intervals between the same value

    Hi all. Working on =SMALL(IF($C$2:$C$15=$E$3, MATCH(ROW($C$2:$C$15), ROW($C$2:$C$15)), ""), ROW(A1)+1)-SMALL(IF($C$2:$C$15=$E$3, MATCH(ROW($C$2:$C$15), ROW($C$2:$C$15)), ""), ROW(A1))-1 This array formula count the interval between the same value. example I would like to see, how is...
  5. montecarlo2012

    vba. plotting quadratics.

    Hello all working on Y = x^2 Sub h() n = 36 For i = 1 To 36 For j = 1 To n If j = i ^ 2 Then Cells(i, j) = "+" End If Next Next End Sub until here I get all the values of the quadratic function...
  6. montecarlo2012

    vba about patterns, code no return

    Hi all working on Sub ff() Dim i%, j%, k%, l% Dim lines%, space% lines = 15 space = 0 For i = 1 To lines ' this loop is used to print lines For j = 1 To space ' this loop is used to print space in a line Cells(i, j).Value2 = " "...
  7. montecarlo2012

    vba not respond at all, no errors

    Hello everyone Working on this code Sub ppp() N = 13 For i = N To -N For j = N To Abs(i) Step -j Cells(i, j) = "X" Next j Next i End Sub Do not show me nothing plus do not show errors either. I am...
  8. montecarlo2012

    vba output only one cell

    Hi All. Sub ab() n = 5 '..................................size px = n '..................................left print control py = n '..................................right print control For i = 1 To n For j = 1 To n * 2 If j = px Or...
  9. montecarlo2012

    vba the loop are not working.

    Hello people. Sub java_to_vba() n = 5 For i = 1 To n For j = 1 To n If i = (n / 2) + 1 And j = (n / 2) + 1 Then Cells(i, j) = " + " Else Cells(i, j) = "" End If Next...
  10. montecarlo2012

    vba, flip it over the pattern

    Hello people with this code, Sub rur() For i = 1 To 5 For j = 1 To 5 Cells(i, j) = i Next Next End Sub I got this how can I get Thank for reading. Please, some help in this.
  11. montecarlo2012

    vba Pattern of numbers using for next.

    Hello people. Sub April_16() For i = 1 To 5 For j = 1 To i Cells(i, j).Value = j For k = i + 1 To j Cells(i, j).Value = 1 Next Next Next End Sub with...
  12. montecarlo2012

    vba. looping in a triangle

    Hello People. Sub pr_1() Dim Row As Integer Dim Column As Integer For Row = 2 To 7 For Column = 2 To 7 Cells(Row, 9).Value = Cells(Row, 9).Value + Cells(Row, Column).Value Next Next End Sub With this code I got this: Adding row by row...
  13. 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.
  14. 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...
  15. 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...
  16. 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...
  17. 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...
  18. 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...
  19. 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 =...
  20. 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...

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