vba & excel 2010

  1. montecarlo2012

    vba. how to apply a condition in an array.

    Hello. In this set of number the main condition is to delete any Set of numbers that have the same different In the example by simple inspection you can realize That the first 4 sets have the same pattern [the same differences] Only the last set is random. I was wondering if I have to write...
  2. montecarlo2012

    vba =IFERROR(MATCH(B2,B3:B$2904,),"")

    Hello. I attempted to write a loop for this formula =IFERROR(MATCH(B2,B3:B$2904,),"") FOR XX = 2 TO Cells(Rows.Count, "B").End(xlUp).Row FOR YY = 11 TO 16 CELLS(XX, YY).FORMULA =”=IFERROR(MATCH(CELLS(2, 2).ADDRESS & “ , “ CELLS(3, 2).ADDRESS & “ : “ &...
  3. montecarlo2012

    vba Range("B8").Formula = "=COUNTIF(B2:J2,B7)"

    Hello. I have this formula Range("B8").Formula = "=COUNTIF(B2:J2,B7)" I am trying to use Cells Method like: Cells(8, 2).formula = “=countif(“ & cells(2, 2) & “” : “” & cells(20, 2) & “, & cells(7, 2)” but no results. Please can you explain me why, and how to do it. or it is not possible. I...
  4. montecarlo2012

    vba Cells(x, 2).Formula = "= IF(" & Cells(y, 2) & ">=" & Cells(z, 2) & ",true, false)"

    Hello. I am working out this idea sub test0() Cells(15, 2).Formula = "=IF(" & Cells(2, 2) & ">=" & Cells(7, 2) & ",TRUE, FALSE)" Cells(31, 2).Formula = "=IF(" & Cells(18, 2) & ">=" & Cells(23, 2) & ",TRUE, FALSE)" Cells(47, 2).Formula = "=IF(" & Cells(34, 2) & ">" & Cells(39, 2) & ",TRUE...
  5. montecarlo2012

    ►("VBA")◄ Cells Method. Cells(5, 3).Formula = "=IF(cells(1, 2) >cells(2, 2),YES, NO)"

    Hi. When I record a macro for the formula IF IF(B2 > B3, true, false) of course work but reading about the Cells method supposedly B3 and cells(3, 2) are the same thing so when I substitute then do not work Sub Macro1() Cells(5, 3).Formula = "=IF(cells(1, 2) >cells(2, 2),YES, NO)"...
  6. montecarlo2012

    ►VBA◄ reference cells.

    Hi, According to the reference cells theory: Using Range Method: Range (“C5”) Using Cells Method: Cells (5, 3) Supposedly are equal so why this macro work Sub Macro2() Range("C5").Formula = "=IF(C1<D1,TRUE,FALSE)" End Sub and this one Don't Sub MACRO3() Cells(5, 3).Formula =...
  7. montecarlo2012

    /vba/ how to make it the worksheet index becoming a variable for looping [workbook-link]

    Hello. I am trying to putting together some work but the second part is difficult to find on internet what specifically I need. this is the first part of the code already accomplish with a lot help. Sub L_100m_multipleSheets() Dim SrcWS As Worksheet, DestWS As Worksheet Dim rngData As...
  8. P

    VBA How to Update the information to the correct Row?

    Hello! Table of Contents: 1. Situation (already working Makro's that are used 2. Question 3. Example I'm currently working on a personal project that is supposed to help me at work. Note: I'm not using UserForms 1. Situation: I've programmed a Macro that lets me copy Values I put into the...
  9. montecarlo2012

    vba Adding worksheets with the same format (workbook - link - upload)

    Hi all. On sheet 4 I have a format on column A, start with number 1. What I want is to create 53 worksheets Starting on sheet4 as first one, then sheet 5 will have the same format " except " the cells "A1" on sheet 5 will display number 2 the cells "A1" on sheet 6 will display...
  10. montecarlo2012

    .vba. frequency of random numbers.

    Hi all. Sub Freq_Ran() Dim freqs(), xxx As Range Set xxx = Application.InputBox("Select the cell you want to process", "Location of souce data", Default:="$H$2:$H$2800", Type:=8) ''' I would like not to use inputbox instead just search for B2 to the last row vals = xxx.Value vmax =...
  11. H

    Row Sequence number error

    Hi Everyone i have an code where the it adds the seq number according to blank row number and it works fine however if i delete any selected rows from the listbox then all of the below sequence numbers becomes and invalid and shows as attached image #REF! below it is the code to Add the...
  12. M

    Indexing and matching based on complex criteria

    Hi. I have a difficult one for you all. I'm trying to translate some data to different columns in VBA based on some complex criteria. Not sure on the formatting to search this stuff so hopefully someone can help ! :) What I would like to do is feed in raw data ID's under Name/Desc/Type in F...
  13. montecarlo2012

    vba.- Adding Sheets.

    Hello all. Sub S9_8() Dim SrcWS As Worksheet, DestWS As Worksheet Dim rngData As Range, cell As Range, M, N Dim rngDest As Range, i As Long Set SrcWS = Sheet1 '::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: Set DestWS = Sheet9...
  14. montecarlo2012

    vba- downsize my code

    Hello all. Working on: sub regre_an () Dim H, Z$() For Each H In Split("B4:B2 B20:B18 B36:B34 B52:B50 B68:B66 B84:B82") Z = Split(H, ":") Range(Z(0)).Value2 = Application.Average(Range(Z(1), Range(Z(1)).End(xlToRight))) Next...
  15. R

    VBA Code copy and paste data from on workbook into an already opened workbook.

    Hello. I'm fairly new to VBA and not sure whether this could be done or not. I want to paste two rows data of data into an already opened workbook. I'll try to explain what i want in a bit more with an example. Consider a workbook "A" where data is entered manually by other people. Workbook...
  16. montecarlo2012

    vba how to apply for.....next

    Hi. working on: [B5].Value2 = Application.Count(Range("B2", [B2].End(xlToRight))) [B21].Value2 = Application.Count(Range("B18", [B18].End(xlToRight))) [B37].Value2 = Application.Count(Range("B34", [B34].End(xlToRight))) [B53].Value2 = Application.Count(Range("B50"...
  17. montecarlo2012

    vba. for each within for next

    Hello. the following code, work good as long my range is fix Sub L_100m() Set rngData = Sheet1.Range("B2", "B2912") m = -1 For Each cell In rngData If cell = 1 Then Sheet2.Range("C2").Offset(0, m) = n...
  18. H

    Leaves blank rows after row with specific word moved to sheet 2

    Hi everybody i have found this code from here and it works perfect however when it is cut it from Sheet 1 to Sheet 2 with specific word "Completed" it cut all the rows that contains "Completed" on column "AG" however it then leave the blanks rows on sheet1 is there any way that when it is moved...
  19. H

    Send email when due date met with the data copied from workbook

    Hi all I was wondering if anyone could kindly help me with the creating some code whereby when expiry Due Date in column J or Column L is due in 90 days then automated email is sent with the copying all of the information in the row each which has due date from Column A to Column M data copied...
  20. montecarlo2012

    vba. about looping to optimize code.

    Hi All. Working on Sub j() Range("B2").Formula = "=Countif(Q2:WAK2)" Range("C2").Formula = "=Max(Q2:WAK2)" Range("D2").Formula = "=Countif(Q2:WAK2, 0)" Range("E2").Formula = "=COUNTIF(Q2:WAK2, 1)" Range("F2").Formula = "=COUNTIF(Q2:WAK2, 2)" Range("G2").Formula =...
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

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
Top