range

  1. ibmy

    Keep Assign "1" to Max Number 3/2 in a Set of Data

    BCDEF1MAX 3 numbernote:MAX 2 numbernote:2122,1271st number : 122,1271st number : 122,1273122,127114122,127115122,12012nd number: 122,12012nd number: 122,1206122,12213rd number : 122,122RESET. 1st number : 122,1227122,127112nd number: 122,1278122,122119122,1221110122,124RESET. 1st number ...
  2. R

    VBA Separate a single range into multiple ranges

    I appreciate you all in advance. I want to change the meta range of below code (meta range:M31:AM53) to 42 separated ranges below...
  3. C

    Consolidation

    I would like to consolidate columns A2:I2 based on the criteria that A2:D2 are the same on the next row. I have attached photos of the whole document to provide how this is supposed to work. I cannot seem to figure out consolidation and I maybe overlooking it. I have the code pasted below...
  4. J

    Checking if it is the 1st cell in a range?

    to all Is there a way of checking when the 1st cell in a range is used see below Sub macro1() Dim rgcurrentrw As Range Set rgcurrentrw = ActiveSheet.Range("A2:E2") Dim strout As String 'what I have currently For Each cell In rgcurrentrw strout = strout & "," & cell.Value Next cell...
  5. J

    Sheets().Range().Copy - Not working all of a sudden

    Been using the below VBA for years - no issue. All of a sudden i get a break on the bolded line. Guessing something to do with how I use 'Range' as everything else in VBA referencing 'Sheets' is fine. Any advice would be greatly appreciated: Sheets("Blotter").Select Range("AE2:AH2").Select...
  6. D

    Create column of all dates in a month (Power Query)

    = Table.AddColumn(Source, "Custom", each {Date.From(Date.StartOfMonth)..(Date.EndOfMonth)}) I am trying to create a custom column but I keep getting this error:
  7. R

    Dynamic holiday range formula

    Hi, I have the following formula which is inserted on sheets through VBA code: =SUMPRODUCT((B3:AF3="AD")*(WEEKDAY(B2:AF2,2)<6)*(ISNA(MATCH(B2:AF2,HolidaySheet!A2:A3,0)))) The A2:A3 range contains two holiday dates which are on a separate worksheet. The holidays change depending on the year...
  8. K

    Multiple Dates (columns) are within range

    Hi all, I wondered if there was a clever/efficient way of checking if multiple columns with dates in, fall within a date range, see below table. I want to check if any of these dates fall between the 25/12/2022 and the 02/01/2023. I know I can do repeating if statements, but thought I'd check...
  9. C

    Select & Copy Cells Between Two Names

    hello, I have had a look through quite a few posts but can't quite find what I'm after. I need to use some VBA to select everything between "START-OF-DATA" and "END-OF-DATA" These will constantly be moving when more rows are added in-between, but I don't want to have to keep changing the cell...
  10. R

    Random value must be unique depending on date range

    Hello, I have a button that creates 12 month sheets for a specific year that is entered into an inputbox. The code below enters values (coming from a master sheet list) randomly every workday per month sheet created. I would like to have only unique random values per week, and a minimum of 2...
  11. B

    Check if date is in vacation time

    Hi guys, Trying to check if a date is between a range of dates in a table with date ranges. So, I have a table with two columns, col C is first day of vacation and col D is last day. And I'm trying to come up with a function to tell me if a given date is inside that range. I'm toying with...
  12. D

    Count rows visible in filtered table

    Hello, I have a table, table name "Reports" it is filtered in column J, and i am trying to get a count of just those rows that are visible but i am getting a high number like if it counting more than just what is visible, Is there a specific vba method to get this count, i tried using the below...
  13. Z

    VBA: find duplicates and change

    I am a beginner at Excel VBA. I just wanna know what code I am going to use for changing the value of the selected column if found duplicate. For example, I want to create a code that changes the duplicates found from their original name to their original name + "_01" (or something similar). It...
  14. R

    Color cells if workday and holiday (VBA)

    Hello, I got a macro button which adds month sheets for a specific year that is entered in an inputbox. The following code unsuccessfully attempts to fill all working days with a pink colour if they match a range of cells that represent the holidays (and include blank cells). Is there a way to...
  15. J

    Sum Data in a Range using unique dynamic references

    Hi alll, Just coming up with a difficult problem at the moment. Trying to SUM forecast data in a Range, but using unique variables to decide what that range is. Forecast Sheet is as follows; A2123456 Stock Sheet is as follows; F25 We want to be able to see based on the Date stock goes...
  16. R

    Sum a range of cells in a row based on values in another row

    Hi, Thanks in advance for any advice on this. I am trying to get one cell to calculate a sum in a range of cells up to the cell/column that has a value on another row. Please see my example below: A1 should sum values in B1:E1 based on the last column that has a value in row 2. In the example...
  17. X

    VBA Find Value from one Range in another Range

    I am in need of some help to do this in VBA. I have a range of values in a Workbook1.Sheet1.F2:F1048576. I wish to check if any of these values appears in a second range in Workbook2.Sheet1.A2:A1048576. (The actual length of each of both ranges will vary, hence why I've used the full length...
  18. T

    How to Refer to Contiguous ListColumn Ranges by Index

    Hey all, I'm writing a macro to set the source data of a chart to several contiguous table columns but I'm stumped at the syntax. The table column headers can change so I'm trying to refer to their index numbers instead. 1 Dim Table1 as ListObject: Set Table1 = Sheet1.ListObjects(1) 2 Dim...
  19. J

    Check with VBA if each value of two different ranges are a match or not

    Hi all, I'm just trying to find a simple code that pops up a msg box saying if all the values of one range are matching all the values of another range or not. I know I can do that with a formula, but I need to do it with vba because I might use it in another applications...
  20. T

    COUNTIF number is in range of values in table

    lets say I have this table I would like a formula to count how many of the rows range contains the number X. for example how many row ranges contains the number 4? that would be 2 (the 4-9 and 2-5) I need this formula to be a part of a bigger one but currently I haven't managed this one yet

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