1. 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...
  2. 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...
  3. T

    Error 1004: union failes

    Hi, I'm trying to split up an Excel in several excels based on a list of values in another Excel. Let's show an example: You see that in the top left Excel there is a list of values. My script starts with the first value 'binnendeuren' and search that value in the first 3 columns of the...
  4. wsnyder

    Union Range Order As Written

    Hi all, Using Excel 365. Is it possible to change the order of columns in a Union or to force the Union to return the Range in the Order written? For example, My data is in Column Order of 3, 5, 6 but I listed the Union as 5, 6, 3 because this is how I would like the output listed But when I...
  5. W

    Copying rows if criteria is met but only specific cells of the row

    Sub copyT() Dim wrfrom As Worksheet Dim wrto As Worksheet Dim lastrw As Long Dim i As Integer Dim rng As Range Set wrfrom = Sheet1 Set wrto = Sheet5 lastrw = wrfrom.Cells(Rows.Count, 1).End(xlUp).Row wrfrom.Select For i = 2 To lastrw Set rng = Union(Range(Cells(i, 1), Cells(i, 6)), Cells(i...
  6. M

    Multiple column transpose query

    Hello - I'm trying to transpose multiple columns into two columns in access (second column being the title) access data currently looks like this Period01 Period02 Period03 120 200 500 110 300 600 200 400 700 I want it to...
  7. K

    Paste Multiple Ranges to Different Sheets With Single Button Click

    I'm trying to set up a single button that copies various ranges and puts them into different sheets in the first open row. The purpose is to have those copied ranges automatically graph as more rows are added (this part isn't perfect but I'm content with it). There are 5 groups of ranges that...
  8. P

    VBA - When Union is used IF sentence does not work..?

    Hi, Im trying to look at multiple ranges and check each cells with an if sentence in order to replace letters with words e.g. If the cells reads "AR" replace it with "Night"..This works perfectly if I say Range("D10:D40") but not if i say Union(Range("D10:D40"), Range("L10:L40")...
  9. rinneii

    SQL: Union

    I'm trying to list both Student and Faculty information using the Union operator. This is what I have so far: SELECT FacNo, FacFirstName, FacLastName From Faculty UNION Select StdNo, stdFirstName, stdLastName From Student; When I ran it, all that displayed was the Faculty information. Should I...
  10. L

    VBA Union Query

    I have a union query with 26 subsequent queries built in Access; however, I get an error saying "System resource exceeded.". I'm assuming I just have too many queries for it to process. If it cut out four of them it works fine. So my question is, can I somehow do a union in VBA with the...
  11. F

    Join ranges in a single one given from comma separated string

    Hi. I have this string that represents rows and row ranges separated by comma. str = "1,3,6:8,11:12" I want to join those rows in a single range variable (rng). I'm trying with this loop but the issue is initially rng is nothing and the "Union("nothing", Rows(s(0)))" gives error...
  12. D

    VBA: Filter before union

    Hi, I am creating a union for later use (export to CSV). Is there a way to filter the columns before the union WITHOUT copying and pasting to a new sheet. So... With sh.ListObjects("MasterData") Set rngToSave = Application.Union(.ListColumns("FATHER'S MOBILE").DataBodyRange, _...
  13. D

    VBA: Column union not working

    I am trying to export specific columns from a defined table to CSV. If I use the following only the first column is output: With sh.ListObjects("MasterData") Set rngToSave = Application.Union(.ListColumns("FATHER'S MOBILE").DataBodyRange, .ListColumns("CENTRE").DataBodyRange) End...
  14. M

    Dynamic use of union function

    I have a routine that asks for non contiguous columns them copies those columns to a new work sheet. The problem I have run into is that the number of columns are not always the same. I have been using a user form that allows selection of cells that allow the column numbers to be passed to the...
  15. A

    Adding formula to union query

    Hi everyone. I am almost done with my project, but I need help with something. Can someone help with getting the following to work? SELECT ID as Eval, "Preparation and Punctuality" AS Criteria, I_Q1 AS Grade, =IF([I_Q1]=1,"F","ERROR") AS LETTER_GRADE FROM issues UNION SELECT ID, "Subject...
  16. N

    Formula to convert text based on commas

    I'm trying to use a formula which would take what's in the column A and convert it to what's in column B. Basically, the entire contents would end up surrounded by square brackets, and anywhere there is a comma, this comma should act as a separator, and finally all phrases separated by commas...
  17. P

    Insert new rows and slit the amounts

    Hi all, kindly advice me for a VBA code so that, to run through col. “H” and where find the descriptions “Trade union 1” and “Trade union 2” should insert rows below and also should divide its amounts in col. “J” by 2 and place them in the inserted rows. Descriptions in new rows should be “Trade...
  18. P

    Turn duplicate rows into unique VBA

    Hi all, i would like to turn duplicate rows into unique using VBA. Therefore the data start from "A2" and the code should run through col. "A" and where the rows are duplicates, should place a number (serial number) on left of description. below i present the original data and the expected...
  19. P

    Enter codes next to description VBA

    Hi all, kindly advice me for a VBA code so that to run through col. “A” and place the codes in adjacent cells to description, col. “B” but for the last 2 rows. The codes are follow: <tbody> TRADE UNION 5012505 SOCIAL INSURANCE 5012508 MEDICAL FUND...
  20. L

    Help to build Union SQL statement Dynamically based on table values

    Guys I would like assistance from you to develop a function that will create a dinamically SQL Union Statement I have an excel table containing on column 'C' the Server Name and on Column 'D' the data base name. The Column 'E' contains the current status of the Servers (0-Offline, 1-Online) I...

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