union

  1. 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...
  2. 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...
  3. 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")...
  4. 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...
  5. 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...
  6. 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...
  7. 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, _...
  8. 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...
  9. 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...
  10. 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...
  11. 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...
  12. 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...
  13. 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...
  14. 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...
  15. 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...
  16. countryfan_nt

    PowerPivot Adding new sheet to already created Database.

    Hello friends, hope all is well! The below code uses a SQL code to combine multi sheets (workbooks) into 1. because there are many rows it is expected to take time, that is OK. The process is done. Now, I want to add on a different date a new sheet, let us say...
  17. countryfan_nt

    PowerPivot: SQL statement is not valid. There are no columns detected in the statement.

    Hello friends, Hope All is well! Going crazy! I keep getting the error msg: SQL statement is not valid. There are no columns detected in the statement. the idea is borrowed from: https://www.contextures.com/PowerPivot-Identical-Excel-Files.html it is to add data from a workbook (4 sheets) to...
  18. countryfan_nt

    Running SQL and Excel faster into Pivot/Sheet (from multiple sheets).

    Hello friends, hope all is well! I learned a very cool trick! https://www.contextures.com/PowerPivot-Identical-Excel-Files.html Now I can use PowerPivot to have mutli sheets/files with Identical Structure in one sheet/pivot (more than 5 million rows). the problem is that the code is too slow...
  19. S

    Excel VBA to hide rows based on cell value in range

    I am looking for assistance in revising code for one of my worksheets (Sheet3). In essence, I want to look at a specific cell within a range and if that cell is blank, then hide the entire range. Sheet3 has 5 ranges to gauge whether to hide the blank rows and thought a Union would be the best...
  20. J

    How do you go through each employee number and see if they have 2 codes to their ID?

    I was given a project to go through each employee ID going back to the first employee and see when they switched from union to nonunion. Below is an example of my spreadsheet. Using VBA, what code would I be able to use to go through each EE# and determine when they switch to union codes 99, 87...

Some videos you may like

This Week's Hot Topics

  • Timer in VBA - Stop, Start, Pause and Reset
    [CODE=vba][/CODE] Option Explicit Dim CmdStop As Boolean Dim Paused As Boolean Dim Start Dim TimerValue As Date Dim pausedTime As Date Sub...
  • how to updates multiple rows in muliselect listbox
    Hello everyone. I need help with below code. code is only chaning 1st row in mulitiselect list box. i know issue with code...
  • Delete Row from Table
    I am trying to delete a row from a table using VBA using a named range to find what I need to delete. My Range is finding the right cell. In the...
  • Assigning to a variable
    I have a for each block where I want to assign the value in column 5 of the found row to the variable Serv. [CODE=vba] For Each ws In...
  • Way to verify information
    Hi All, I don't know what to call this formula, and therefore can't search. I have a spreadsheet with information I want to reference...
  • Active Cell Address – Inactive Sheet
    How to use VBA to get the cell address of the active cell in an inactive worksheet and then place that cell address in a location on the current...
Top