Moving Table Data Between Worksheets

Apr 11, 2008

I am trying to convert a workbook that we commonly use from worksheet functions over to VBA. Looking to use controls (buttons and such) to automate the tasks which functions used to do.

Most I figured out on my own, but there is one that is giving me some problems.

I have a worksheet page that queries data from an external database. I need to take this data and move it to another sheet with the correct formating and calculations. (see attached sample workbook. Sheet 2 is the database info and sheet 1 is where I need to move it to.)

Since the database data will have a variable number of rows, I need to do the following with a button:

1. If a row from sheet 2 contains data,
- Move the 'wonum' value from sheet 2 to the 'W/O' column on sheet 1
- Move the 'description' value from sheet 2 to the 'Name' column on sheet 1
- Move the 'wopriority' value from sheet 2 to the 'Pri' column on sheet 1
- Move the 'laborhrs' value from sheet 2 to the 'Hrs' column on sheet 1

(here is where it gets tricky)

- If values for 'targstartdate' and 'targcompdate' on sheet 2 are the same, then insert the 'laborhrs' value from sheet 2 into the correct day of the week column (minus 1) on sheet 1

(for instance if a database record's start and end date are both '4/13/2008' and the 'laborhrs' value is 3.00, then place 3.00 in the cell corresponding to the column labled '4/12/08' on sheet 1)

- If values for 'targstartdate' and 'targcompdate' on sheet 2 are not equal, then the 'laborhrs' value must be equally divided by the number of days difference and placed on the date columns on sheet 2 that correspond to all of the days (minus 1) that fall in that date range.

I filled out 2 of the rows on sheet 1 to give an example of what I am looking for.

View 14 Replies


ADVERTISEMENT

Moving Specific Data Between Worksheets

Dec 31, 2009

I have two worksheets. On one worksheet under column G I have hundreds of random numbers, but I only want to extract a specific half. In the second worksheet I have two columns A and B. Column A has the exact numbers that I want to extract from Column G. I would like to get the numbers from Sheet 1 under column G listed under Sheet 2 Column B in reference to Column A.

View 9 Replies View Related

Worksheets Drawing Data From Target Cells Without Moving If Add Lines?

Feb 19, 2014

I have one excel file sheet in which we enter client data and another page in the same file that formats the data. Each new row is another client.

It is a simple formula in the data formatting sheet ='data sheet'A23 for example.

The problem is when we add client data above A23, say 2 rows, the format data page will follow the original cell and now say ='data sheet'A25.

How do I keep the cell as ='data sheet'A23 no matter what I do the original page?

View 1 Replies View Related

Moving Data In Formatted Table

Mar 6, 2010

Receive worksheets with data in different layouts that needs to be moved into formatted worksheet with unique layout and field size to import in to Access database.

Example of formatted table layout ....

View 9 Replies View Related

Excel 2010 :: Pivot Table Reference Is Not Valid When Moving Data And Pivot Table Together?

Mar 19, 2013

On a worksheet, I created:

- a list of data
- a pivottable based on these data

When moving this worksheet this worksheet to another workbook, the pivot table can't refresh anymore. This throws an error message "Reference is not valid". To work around this problem I need to adapt the datasource. The same occurs if the list and the pivot table are on separate sheet, with the added strange behaviour that, when data an PT are split, it is not possible to move both sheet together.

This would not be a big issue if my problem had to be solved manually. The real problem is that I need to move the sheets from a C# program.

View 3 Replies View Related

Table Containing Data From All Worksheets

Feb 17, 2014

I have a file that has 62 worksheets in it. 1 for each day shift, and 1 for each afternoon shift (1 Days, 1 Aft, 2 Days, 2 Aft, etc). I want to have a new worksheet that has a table with a column for EVERY shift, with the associated value from BH11 on that sheet. (see chart below).

The problem is that I don't want to write these formulas 124 times each month to create this table, and Find & Replace doesn't work with worksheet names in formulas.

Is there a way to do this without manually typing all of the formulas? (I don't want a sum formula--My table will be 62 columns and each cell will have a link to the cell BH11 on the associated worksheet.--If I want to see what our value was on the day shift on Jan 15, I would go to that column in this chart and it would have a link to '15 Days')

1 Days
1 Aft
2 Days
2 Aft
3 Days
3 Aft
4 Days

[Code]........

View 1 Replies View Related

Pivot Table: Data Spread Across Different Worksheets

Nov 11, 2006

I have a spreadsheet with data across multiple worksheets and I am trying to figure out how to use the data from the multiple spreadsheets to create a single pivot table on a separate worksheet. I cannot reasonably bring all the data into one workshet because each one has thousands of rows. I want to pull data from select columns in each worksheet. How can I isolate only the data I need from different worksheets into one pivot table?

View 3 Replies View Related

Moving Control Between Userforms And Worksheets

Aug 10, 2006

"how do you move control/focus between Userforms and a worksheet that has Control objects on it?"

Here's what I am trying to do... I have created a Workbook that is basically a database and uses several Userforms to allow users to enter data into the database. I then have various CommandButtons in the Userforms that are intended to extract information from the database (which is stored in a worksheet) and display that information on a newly created worksheet. What I want to do is have a CommandButton on the new worksheet (the new worksheet is called "Results") that when pressed will delete the Results worksheet and return control to the Userform that created it.

So, the basic steps are:

* Display the Userform with the show method
* On the _click event of a particular Command button, Add a new worksheet
* Fill the worksheet with the pertinent data
* Place a Command button on the new worksheet and call it "Close"
* Somehow transfer "focus" or control to the new worksheet so the user can move around, print, do whatever on the new worksheet and then when done press "Close"
* When "Close" is pressed, delete the newly created worksheet and then return control to the original Userform.

View 3 Replies View Related

Moving Worksheets With Macros Tied To Buttons

Sep 10, 2004

I have a setup at the moment where I have a spreadsheet using a bunch of macros that are coded in a module attached to another spreadsheet. In both spreadsheets the macros are tied to Excel buttons placed within worksheets. When I copy the spreadsheets each month to new directories - they're used for some monthly reporting - I see the following behavior:

1/ The spreadsheet that contains the module with the code for the macros correctly updates the location of the macros and works OK.

2/ If I open the other spreadsheet and save it the macros appear in the tools/macro dialog as having changed location OK. However, if I try to use the macros by pressing a button the macros invoked are in the old location. If I check the assignment of the macros in this spreadsheet by right-clicking on a button, indeed the macros invoked are in the old location. This means that I have to go through and manually update for each button the macro invoked.

View 2 Replies View Related

Moving Worksheets With VLookup Between Documents Without Changing References

Aug 23, 2012

I'm working on an excel report that handles reporting for a large number of people. Another person at work is doing the VBZ coding, and I'm doing the formulas that aggregates the data. which has led to an interesting problem whenever I use a vlookup. I copied the sheets with the formulas from the test document I had been working on to an updated version. And all the vlookups automatically adjusted themselves to reference the document they had been created in. I had also moved over the tabs they were supposed to reference, but they keep looking at the old document. I spent an hour removing the references last night, but I don't want to do it again when I get the final product.

How to get excel to copy a formula EXACTLY as written, and not att in the name of the original document?

It should say
=VLOOKUP($A438,totals!$A$1:$AH$63,32,FALSE)

and instead it says
=VLOOKUP($A438,'[reporting formulas.xlsx]totals'!$A$1:$AH$63,32,FALSE)

View 2 Replies View Related

Moving Cells Up Or Down Under A Pivot Table?

May 25, 2014

is there an option to allow cells under a pivot to keep the same distance under the pivot table when it grows larger or gets smaller?

View 1 Replies View Related

Insert A Row With A Macro On A Moving Table?

Jan 27, 2010

I'm trying to create a macro that will allow me to insert two rows to extend two separate tables. The problem is that one table needs to be directly below the other. So if the number of additional rows exceeds the margin between the two tables, the macro will just be inserting two rows into the top table.

I guess I'm looking for a way to get the macro to insert a row, not at a specific row number, but at the first row of the bottom table, which will change as rows are added to the top table.

View 3 Replies View Related

Moving Colored Text Within A Automatically Adjusting Table Containing More Than 3 Col

Jan 17, 2007

Moving Colored Text within a automatically adjusting table containing More Than 3 Colors, from Coloum to Coloum. i have managed to put this little chart together to use on our gaming wedsite but i would like to go one step further with it. may table automatically moves the colums up and down the table as i enter the infomation in to it,, "but" I the colours in the text do not stay the same as they move up and down the coloums. how to make the coloured text keep its colour in the table as it alters its position in the table

View 9 Replies View Related

Moving Cell Values Appearing Multiple Times Into A Table Listing Them Only Once?

Jul 5, 2014

I have a table listing certain values (Column C) and their respective probabilities, based on normal distribution (Column D). As these probabilities are dependant only on values from Column C, I'd like to list all the values from that column into another fragment of the sheet, say F6 and below, but each value should appear there only once, no matter how often it occurs in its original Column C (I listed them manually in Column F in the enclosed example). Moreover, if a new value appears in Column C, it should be also included in the new place and sorted in increasing order.

View 7 Replies View Related

Moving And Deleting Entire Rows Between Tabs In Workbook And Moving Them Back If Needed

Sep 23, 2013

I have an excel work book with 6 tabs. I would like to have Excel move an entire row from one tab to another tab (removing the row and inserting it in the other tab). I.e. Example I have a tab with items that are marked as "Open Actions" so if I were to change the drop down to close. Excel would move that entire row of actions to the tab with the "closed actions" and insert into the next available row. Now if someone were to come back at a later date say no it should be reopened than I would change the drop down to open and excel would move that row back to the open actions tab into next available row. I tried a PIVOT table and no good I played with few macro and not.

View 5 Replies View Related

Excel 2007 :: Moving Data From One Worksheet To Another Keeping Data And Formatting?

May 5, 2014

I am working on a project that has 5 worksheets. I have been able to figure out everything else I need to do but this has me stumped. I have data in Sheet1 A6, that i want to place in Sheet2 A6, Sheet3 A6, Sheet4 A6 and Sheet5 A6 and keep data and formatting(BOLD AND UNDERLINE). So I change Sheet1 A6 and the other 4 sheets change also. I'm using Microsoft Excel 2007.

View 1 Replies View Related

Excel 2010 :: Sort Worksheets Alphabetically And Keep The Data In Worksheets

May 15, 2013

I have read that there is a VBA macro in F11, but I also read that it would only sort the workshhet names, but not the data. I have Excel 2010.

View 2 Replies View Related

Data Validation Rules Not Moving With Data

Feb 24, 2014

creating a spreadsheet for work which is almost working a treat Unfortunately, when a row of data moves from one sheet (Queries) to another (Archive), data validation is lost. Initially I thought I daidn't have it set up on the Archive sheet, but on moving it back to queries (by use of a macro) the validation is still not working. how to keep validation rules WITH data when it is moved please? I will upload my file when I get home from work....network restrictions prevent me doing it here!

View 8 Replies View Related

Moving Rows Of Data Into 1 Row

May 20, 2014

I'm essentially getting a lot of data at the moment, which has a few orders people have made on my website.

Essentially, think order id, address etc and then all the products the customer has ordered.

However, the part which includes what the customer has ordered creates multiple rows of data, with the order ids etc duplicated. What I need to do is consolidate this into 1 row. So to add additional columns instead of rows.

The reason fro this is I want to mail merge the data into an invoice and mail merges work of 1 line of data at a time. I've attached an example, any way to do this?

(Attached to this post / or linked here: [URL] ....)

View 1 Replies View Related

Moving Data To Another Cell

Dec 11, 2009

I have 3 columns Z, AA, AB. The heading for Z1 is “A”, AA1 is “B” and AB1 is “C”
In column Z2:Z2000, there is a mix of A, B’s and C’s. I want A to stay in Z1 column, B’s to goto AA1 and C’s to goto AB1, also I want this added to a macro that I previously created, so everything happens with one push of a button

Now for save, not sure if this is possible or not, if I can have this added to the macro as well that would be great. When I push my macro button, the file saves to “Dec (today’s date) DB (81).xls” The number 81 is the total count of A, B’s C’s, this # will change depending on how may A, B’s and C’s there are. I really hope there is a way of doing all this

BEFORE

A B C
B
A
A
B
C
C
C
A
A
B
C

SHOULD LOOK LIKE THIS

AFTER
A----B-----C
----- B.....

View 4 Replies View Related

Moving A Row Of Data Into One Cell

Dec 13, 2012

Essentially, there are two columns I am dealing with. One is "Sales Rep" and it lists all of the sales reps employed by the company. The other is "Zip Code" and that will list all of the zip codes that sales rep is responsible for.

Now, I have a row of data, all of those zip codes listed out, that each rep is responsible for, but my supervisor wants all of the zip codes listed in one cell, in that second column. Example: (02018, 34098, 16711).

The commas are not necessary, but is there any way to get this done other than manually entering them?

View 6 Replies View Related

Moving Data With VB Code

Jul 24, 2007

I have a workbook with 5 Tabs. One of these tabs is "Completed" (for completed work) The other tabs are names of Managers and the tabs contain information about who is doing what work for the Manager and information about it.

What i would like to do is in column F on every sheet is the "status". I would like when the "status" is changed to completed, to have VB code move that entire record to the Completed tab.

I think its possible i just don't know how to do it.

View 14 Replies View Related

Macro For Moving Data

Sep 1, 2007

I need to move a lot of data from what was originally a txt document into an easily readable form.

I have used Macro's before but only for very basic routines (so please treat me as a bit dumb when it comes to Macro’s).

I have Include Screen shot of the data highlighted in a colored box and the relevant colored cell I need to move it into.

This needs to be repeated many times with data that is consistent in its layout.

View 12 Replies View Related

Moving Matching Data Into The Same Row From Different Ones

Jul 21, 2009

what im basically trying to do here is to move XYZ from column B and 123 from column C to match up with XYZ in column A ....

View 7 Replies View Related

Moving Data Between Two Userforms

Aug 6, 2009

I am trying to do what I have quoted below. In particular,I have the two userforms set up so that I open one and then click a checkbox that opens the second userform. I would like the data I enter into a texbox in the second userform to populate a text box in the first.


Originally Posted by dominicb
Good evening scott92

Sounds like you want to dump the contents of textbox1 into a public variable and force textbox 2 to pick them up from there. You might have a problem deciding exactly when textbox2 is to update - ie what event you're going to hang it from. Are both userforms visible on the screen at the same time? is the updating to take place in real time?

HTH
DominicB

View 5 Replies View Related

Moving Data From Spreadsheet A To B?

Jan 31, 2012

i need to move data from a speadsheet (that is open) to

P:SharedAgentsAdmin TeamAvrils TeamSamuel Kinver-WrigleyEscalations ManagementSIOXTeamNew SIOX beastFOR GRAPH PURPOSES.xls

So all the data in the open workbook is in a sheet called "move sheet".

So first to move:

A1:D13 to the workbook address above in sheet "admin" but it needs to look for the next available row in col. A to paste the data.

then

A15:D27 to the workbook address above in sheet "Outgoing (Cust.)" but it needs to look for the next available row in col. A to paste the data.

View 5 Replies View Related

Moving Data From One Sheet To Another

Jul 11, 2012

What vba code would I use to move data from rows a and b in sheet 1 to sheet 2. preferably with a button if possible.

View 2 Replies View Related

Moving Data From One Workbook To Another

Jan 18, 2014

I have two workbooks and wish to extract data from the first workbook (second tab), and insert certain cell data into a specific cell in the second workbook (first tab).

The first workbook has this info:
SN
SN
Sort
P/N
Removal
Customer 1
Customer 2
Program
Rec Month

ABCD1234
D1234
1234567899
Scheduled
Customer A
Customer B
Block 10
Nov-13

[Code] .......

This is a very large data set. The S/N will appear multiple times. The rest of the data will change with each entry, but there are some exceptions where it may be the same.

The second workbook has this data:
ID
S/N
A
B
P/N
Born-on-Date
Date Rec
Ship Date
Customer 1

123456
ABCD1234
1 thru 14
Yes or No
1234567899
03/10/2007
11/07/2013
11/22/2013
Customer A

[Code] .......

This too is a very large data set. What I need to do is to find the S/N in the first table "based on the month" and replace the entry under Customer 1 with the associated Customer 2 data entry. The VLOOKUP function can't seem to handle the multiple S/N entries.

View 1 Replies View Related

Moving Data In A Database

Mar 15, 2007

I've "lurked" around the board for a few days now, and I've gotta say this is the most helpful excel forum by far. After wading through a tiny chunk of the thousands of threads on this board, though, I am still having trouble with coding a macro that will do what I need it to do. If it affects anything, I'm on Excel 2002 on Windows XP.

I am currently in a project where I have to go through a database, formatted as thus: ...

View 9 Replies View Related

Moving Data To A New Cell.

Apr 12, 2007

I have cut and pasted a large amount of data onto a spreadsheet. The problem is that I have two rows of data that is associated with one another, so lets say A1 has a name and A2 contains that person's age. This process repeats in the same way in A3 and A4 and so on.

I need to move the data from A2 to B1 without using a simple function like =A2 in B1. The reason is that I will need to sort just the Names in column A once I get the the data moved. I am not sure how to do this.

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved