Copying Formulas Between Worksheets While Keeping Reference To Original Worksheet?

Mar 4, 2014

I have a series of formulas in Row 1 across the columns in worksheet A. I would like to copy these formulas to a single column and down rows in worksheet B while retaining the references to worksheet A. I know that I can manually enter the references in worksheet B but that would take a long time to do.

View 1 Replies


ADVERTISEMENT

SaveAs Worksheet To Another File / Folder While Keeping Original Open / Active?

Apr 15, 2014

I have an Excel Worksheet (let's call it "AA.xlsm") which uses VBA code to loop through column A, update column B with some results/values, and then (for each value in column A) SaveAs the worksheet into a different filename/path as a ".csv" type file.

My line of code for the SaveAs is as follows: Workbooks("AA.xlsm").SaveAs LEpath & CurrFldr, FileFormat:=xlCSV

My problem is that my original worksheet, AA.xlsm, gets closed whereas I need it to stay open/active after each SaveAs iteration.

View 3 Replies View Related

Copying Values But Keeping Rows That Have Formulas In Them

Dec 31, 2012

I have a spreadsheet with a lot of financial information going down a column (about 500 rows down). Most of the cells are just typed in, but certain rows have sum formulas in them. Is it possible to copy values from another workbook, paste the values in, but somehow keep the formulas that are running through?

View 1 Replies View Related

Keeping Macros When Copying A Worksheet

Mar 12, 2012

I've managed to be able to create a macro to make a copy of a worksheet within excel.

However, when that copy is create all the macros are lost. If it is not possible to copy all the macros that are within the "Original Hours" sheet, I at least need a macro that will take people back to the original hours sheet (we have disabled sheet tabs, so need the macros to navigate through the worksheet).

Code used is below

Private Sub Hours_Click()
Sheets("Original hours").Copy After:=Sheets("Original hours")
ActiveSheet.Name = "Update hours"
ActiveSheet.Unprotect "PASSWORD"
With ActiveSheet.UsedRange
.Value = .Value
Sheets("Update hours").Select
End With
End Sub

View 7 Replies View Related

Copying Formulas (autofill The Reference Number Jumps By 3)

Mar 17, 2009

I have 2 sheets in a workbook where i would like cell G8 on sheet 1 to equal the value on A11 sheet 2 & G9 to equal A12 and so on down the sheet. The problem is that G8 are 3 merged cell so every time I try to use autofill the reference number jumps by 3. The formula in cell G8 is

View 3 Replies View Related

Merging Duplicate Rows And Keeping Original Data

Feb 18, 2014

I need to merge rows with duplicate values in column A (Patient Name being the most important one), with columns B, C, & D usually having different isolated values as well. Columns E, F, G, H, & I are date columns, but the data is always going to be the number 1, meaning a patient was seen once that day (if they were seen two times that day for different reasons, information would be in an unmerged second row [same patient name listed in two separate rows], where columns B & C would be different). Column J is an autosum of columns E through I if that makes a difference. Column K is a notes column. The data that needs to be merged is always added to the bottom of the spreadsheet in order to show that a patient was seen on any given day, with columns B through K almost always being blank. Example:

Column A---------Column B---Col C----Col D--Col E--Col F--Col G--Col H--Col I--Col J---------Col K
Patient Name-----Therapist---Shared--%P----2/3----2/4----2/5-----2/6----2/7---Total Visits--Notes

Alice Alpha--------AB----------PT-------1---------------------------------------------0-------------blah
Boris Beta---------BC----------SELF----2----------------------------------------------0------------blahblah
Carl Carlisle-------CD---------PTA------3----------------------------------------------0
Carl Carlisle-------AB---------SELF-----2----------------------------------------------0
Donny Delta-------DE---------PT--------1---------------------------------------------0
Ernie Elephant-----EF---------PTA-------2---------------------------------------------0
Alice Alpha-----------------------------------------------1
Carl Carlisle--------------------------------------1--------------1---------------1
Ernie Elephant-------------------------------------------1---------------1

This is what I'm hoping it can look like:

Column A---------Column B---Col C----Col D--Col E--Col F--Col G--Col H--Col I--Col J---------Col K
Patient Name-----Therapist---Shared--%P----2/3----2/4----2/5-----2/6----2/7---Total Visits--Notes

Alice Alpha--------AB----------PT-------1---------------1-----------------------------1-------------blah
Boris Beta---------BC----------SELF----2----------------------------------------------0------------blahblah
Carl Carlisle-------CD---------PTA------3-------1--------------1---------------1------3
Carl Carlisle-------AB---------SELF-----2----------------------------------------------0
Donny Delta-------DE---------PT--------1---------------------------------------------0
Ernie Elephant-----EF---------PTA-------2--------------1---------------1-------------2

In this example Carl Carlisle is being seen for two different things, however how would it be written so the macro would know which Carl Carlisle row to merge with? I'm thinking that before running the macro I could manually enter the information into column B so it knows which Carl Carlisle row above to merge with.

Data always starts at row 14 (row 13 is frozen pane header column), and extends to a row that is different every week depending on how many people happen to be in the list.

I found something from this link that looks very similar to what I need, but with no knowledge of coding, I have no idea how it should be tweaked: Merge Duplicate Rows Keeping Data In Same Columns

I know I'm asking a lot, but the amount of time this takes to manually go through hundreds of rows of patient names every week is incredibly time consuming, and I have too many other things to stay on top of at work for this to drag me down day in and day out.

View 5 Replies View Related

Copying Sumproduct Formulas Between Worksheets Causes Errors

Oct 19, 2007

I was kindly provided with a formula from this forum a few months ago (in the attached workbook) to calculate the area under the curve of strings of data of varying length (i.e. different number of rows) these strings of data are aligned with a timeline (providing the Y and X axis for the curve respectively). The formula is able to calculate the area under these curves without the need for adjustment to the number of rows of the dataset.

However I have now tried to copy this formula to a new datasheet with a different total number of rows and a timeline fixed (of different intervals) in column A (rather than moving for each string of data) and I am receiving a #N/A error. I am sure that I have copied the formula correctly. Can anyone help fix my formula so that it calculates area under the curve again? I would like it to calculate the area under the curve for the data in the same column but using the fixed timeline in column A.

The working formula is on the sheet ‘original formula layout’ and the formula containing the error is on the sheet ‘new formula layout’.

View 4 Replies View Related

Macro To Copy Formula While Keeping Original Cell References

Feb 17, 2009

I'm trying to create a VBA macro that will allow me to copy a formula from one sheet to another whilst keeping all the original references.

E.g.

If the formula on Sheet1 is:

= sum(A1:B6)

then the copied formula on Sheet2 would read

=sum(Sheet1!A1:Sheet1!B6)

You can do this by cuting the cell, but I don't want to do this, I want to leave the original cell unchanged.

I'm sure there is some simple VBA code to do this, but I can't seem to figure it out.

View 9 Replies View Related

Converting Formulas To Values While Copying / Pasting Columns Between Worksheets (VBA)

Feb 6, 2014

I have code that "mostly" works great. I'm copying columns from one sheet to another sheet, but in different columns. I have unique code for each copy/paste. The source is mostly raw data. However, there are a few columns that are formula-based, and I'm having a problem. I've attached my code, and it works, but it takes 20 minutes to complete.

I'm very new to macros, but I think(?) I know enough that a data source with 2,000 rows and 30 columns shouldn't take 20 minutes to complete the macro calculations. All of the columns (copy and paste) in the code are pure data. The only exception is the column labeled "AI". Is there are shortcut, other than creating new columns in the source data sheet and pasting these results as values? I put the specific pieces of code that I'm referencing in bold.

View 3 Replies View Related

Auditing Formulas That Reference Another Worksheet

Dec 28, 2007

On choosing Auditing Funtion, Trace Dependants, a small icon representing a spreadsheet ? appears at the end of a dashed line. What does this refer to?

View 3 Replies View Related

How To Increment Worksheet Reference When Copying Formula

Feb 26, 2014

I'm having to copy formula on a tabulation sheet that compiles information from other worksheets, and I need to change the formulas in each row to refer to the successive worksheets. Right now I don't know any other way than changing the formula in each cell, and this is taking way too long.

Example:

One cell's formula: =COUNTIF('5'!$F$21:$T$50,TABULATION!C$5) In the next row down, I need it be: =COUNTIF('6'!$F$21:$T$50,TABULATION!C$5), then =COUNTIF('7'!$F$21:$T$50,TABULATION!C$5), and so on.

[URL]

View 4 Replies View Related

Copying Formula - Dynamic Worksheet Reference

Jan 22, 2010

Is it possible to copy a formula and have the worksheet name increase incrementally instead of the cell reference? Example: In column A, I have the following -

=TDI_SR_F_1!$G$1
=TDI_SR_F_1!$G$2
=TDI_SR_F_1!$G$3

I want to copy this across to column B, but instead of just copying that exact foruma across I am wanting a formula that will update the worksheet reference to:

=TDI_SR_F_2!$G$1
=TDI_SR_F_2!$G$2
=TDI_SR_F_2!$G$3

TDI_SR_F_2 is the worksheet after TDI_SR_F_1. NB - I cant use find and replace function as it will change the '1' which is part of the cell reference ($G$1) to a 2 as well. I know I can use TDI_SR_F_3 as a search string, but the process is going to be extremely tedious, i.e. there are literally over 100 rows I need to do the find and replace on.

View 2 Replies View Related

Copying Data From Several Worksheets In One New Worksheet

Oct 19, 2009

I'm getting reports in an Excel file with more then 30 worksheets. All of them have the same structure. I would like to add them all in one single sheet and to place the source "sheet name" in the last column. All sheets have 12 columns with different number of rows (between 1 and 100). First row in each sheet is the header of the table.

View 4 Replies View Related

Copying Data From Multiple Worksheets To A Master Worksheet

Jun 22, 2009

I have a workbook with multiple worksheets. Each worksheet is a set o data from a certain year. I want to create a macro that automatically copies the data from these worksheets into a master worksheet that can easily be used to make a pivot table.

View 3 Replies View Related

Automatically Copying Data From Master Worksheet To Other Worksheets In Same Workbook

Mar 14, 2014

I have to input information into a master worksheet which contains data (employee names, location, start date and client) that then needs to be repeated in several other sheets. I want to input the data into a master worksheet and then automatically populate the other sheets with the data. If the data could then be filterable on each sheet that would be good.

View 9 Replies View Related

Keeping Cell Formatting When Copying Data

Oct 28, 2013

I have a piece of code that runs through various excel files and takes the data (minus the header) and pastes that into a separate workbook. The piece of code that does the actual copying i think is this (i have used code from the msdn website)

Code:
With sourceRange
Set destrange = destrange. _
Resize(.Rows.Count, .Columns.Count)
End With
destrange.Value = sourceRange.Value

I have tried replacing the sourceRange.Value with sourceRange.Text however when i do that it will copy nothing any more.

View 2 Replies View Related

Deleting Lines - Keeping Formulas Fixed

Sep 6, 2007

With a macro i want to delete some lines in sheet1. In sheet2 however i have formulas that point on sheet1 .. like this

=sheet1!A1
=sheet1!A2
=sheet1!A3

Now when i delete line 2, the result would look like this
=sheet1!A1
#NV!
=sheet1!A2

Is there a way to make these formulas pointing at the same cells after line two is deleted? And i do not mean a work around, with different formulas. I just want the Formulas in sheet2 to remain unchanged, regardless of what happens in sheet1...

View 9 Replies View Related

Copy Formulas While Keeping Cell References

Sep 1, 2009

I need to copy a bunch of cells that contain formulas without altering the cell references. I know I could change each formula to contain absolute cell references, then copy and paste special with formulas, but this is alot of work, and following that I'd need to change the references back again from absolute to relative in both locations. So, is there a way to quickly copy and paste formulas in multiple cells without altering the cell references?

View 2 Replies View Related

Copying Vlookup And Maintaining Original Table Array

May 5, 2008

I'm trying to copy a vlookup to an entire column, I want to look up a value in the cell to the left and compare it to a given table; but when I copy it down it up dates the cell value, but it moves the table down by one row at every row so it's not finding most of the values the further down I go.... what am I doing wrong. I doubt I'd have to re write the formulas in all the 2500 cells I need to look up.

View 3 Replies View Related

Keeping Cells Locked And Protected When Copying And Pasting?

Jun 19, 2006

So i have sheet 1 with some cells locked and protected (but open to copying) as a template and sheet two will be where people paste one or more of the template formula on an ongoing basis. How do i mantain the locked and protected cells after they have been pasted? I have unlocked sheet two pasted the first template and had to choose protect cells after pasting, and further pasting of locked cells are not protected.

View 1 Replies View Related

Move Data Whilst Keeping Formulas Intact

Feb 27, 2010

i have data in worksheet 2, a table with formulas using worksheet 2 in worksheet 1, i need to move the data in worksheet 2 to another worksheet, but if i use cut or copy and paste the formulas do not track its movement, so how do i move the data to another worksheet so the formulas know where it went? i thought if you could select the data and drag the data straight into another worksheet but how?

View 9 Replies View Related

Copying Formula On Entire Column Adjusting Some Values But Keeping Some The Same

Jun 28, 2014

How to express what I am trying to do in a sentence but basically I have this formula

[Code] ..........

I need B# to change automatally like it does when you copy the formula but i need the N1 and N2 to stay N1 and N2, how do i do this?

View 3 Replies View Related

Clear Cells That Have Numeric Data. Keeping Text And Formulas?

Apr 14, 2009

I have a series of worksheets that are formatted for data imported from various scripts.

What I want to do is parse through each worksheet and cell, when the cell has numeric data, I want to clear the cell.

I do not want to clear the cells on the following conditions:
Cell has Text
Cell has Formula
Cell has date, month or time

View 9 Replies View Related

Re-establishing Formulas On “text” Input For A Specific “cell” = Original Formula Act

Nov 23, 2009

See attached worksheet for reference. Is it possible (while utilizing the same spreadsheet on a weekly basis) to zero a spreadsheet subsequent to its use. Importantly however, all relevant formulas must remain perfectly intact and will re-establish themselves once relevant data is placed inside an individual cell? In this case, as soon as a “Name” (or even a letter) is referenced inside the “Name” column: H10:H19?

In other words, the entire sheet is blank bar the top date and respective headings. Once any text is placed inside cells H10:H19, the formulas from the associated Row re-applies itself to the “Week-Start” dates, “Week-End” dates and references a default “Phone” amount for ‘$10’? The Data Validation formulas I’m sure would remain undamaged? This would prevent ‘text clutter’ (such as dates extending to the bottom with no apparent referencing or connecting information?

View 2 Replies View Related

Keeping The Same Cell When Switching Worksheets

Mar 30, 2007

I would like my cursor to stay in the same cell when I switch worksheets. If I'm in B40 on worksheet one, and switch to worksheet two I would like the cursor to be in B40.

I'm using very basic excel functions with no scripting at the moment.

View 9 Replies View Related

Keeping Only Selected Rows Over Multiple Worksheets

Nov 29, 2013

I have an excel file with over 20 worksheets and each of them have around 1200 rows. The first column in each worksheet contains the variable names and then the data associated to it is present horizontally.

I only want to keep around 80 rows from those 1200 rows. They are not in sequence (means they are not in continuous order) so I manually selected those rows by deleting the non required rows step by step.

I did it manually on 2 worksheets but I don't want to do that manually over 20 worksheets. Is there any method that can speedup the whole process.

I am attaching the snapshots of the worksheets..

This one is before I deleted the unwanted rows.

This one is after the deletion of unwanted rows.

View 3 Replies View Related

Copy Selected Cells And Paste As Formula With Original Cell Reference

Nov 20, 2012

Wanted to know if there is a macro that can copy the selection of cells and paste it as a formula with original cell refernce.

For Example :

Copy Selection Cells - Say Cells A1 B1 & C1
and Paste It as formula In Cell D1 as =A1+B1+C1

View 7 Replies View Related

Copying Multiple Columns From Multiple Worksheets To Summary Worksheet

Jul 28, 2013

I'm making a Excel list for trading cards (MTG) and I've divided it into different worksheets in order to sort it by the color of the cards (not really important I guess).

The issue I have is that I want it to copy certain columns (in this case C3:C1000, F3:F1000, G3:1000 ) from almost all of the worksheets into a new worksheet where it should paste them into column A, B and C.

In two of the worksheets it's also different (C3:C1000 , G3:G:1000, H3:H1000).

I've seen many where you copy one range from multiple worksheets, and that would've been okay I guess if not those two worksheets were different. I'd prefer not to change them, and I'd also prefer if I could've gotten just the information I needed also. Is this possible to do?

View 5 Replies View Related

Reference Cells Keeping Columns The Same But Change Row Number Based On User Input

Dec 10, 2012

Date
#
Lname
Fname

[Code].....

With that said, I want to put the row number of a user in (I have a few thousand on this spreadsheet, and all the = data be automatically pulled based on the row number I put in cell B1. So I'm hoping to write in cell B1 the following - "143" (without the quotes), and the remaining cells in column B automatically pull that data based on that, so it would look like the following

Row #
143
Name:
=C143&" , "&D143&" "&E143

[Code]....

How do I write the functions to keep the columns the same, but change the row number based on the number I input?

View 3 Replies View Related

Splitting Large Table Into Separate Worksheets Keeping Format Same

Apr 26, 2013

I have 2 large XLS sheets that need to be split into seperate sheets.

The first is only 5 columns wide but the amount of rows changes day to day.

The second is a maximum of 7 columns wide and again the amount of rows will change.

I'm hoping for a VBA code to be able to do both on seperate books.

The A Column has the name of the company, and this can include (/,&) that will need to be removed, the names can also exceed 31 characters.
I would like to seperate the sheets by the company name and have the name appear as the sheet name.

Also the formatting from the master sheet to be copied to the resulting sheets, with a header row.

I have included the data for the larger of the two workbooks. data.jpg I have to pull the smaller report each day and the larger report each week.

View 3 Replies View Related







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