Sorting Worksheets With References To Second Worksheet

Apr 21, 2009

I have a workbook with two worksheets.

Worksheet one is "Company ID" info, in it are the columns:"Company Name", "street add", "city", "state".

Worksheet two is "Company Contact Person" in it are the columns: a reference to worksheet one column one "Company Name", and column two is 'Contact Person name'.

I want to be able to sort worksheet one at will, By city, or state, or any of the various columns. When sorting worksheet one I want the relationships in worksheet to to remain intact.

"Company Name" - "Company Contact Person".

View 6 Replies


ADVERTISEMENT

References Goes Wrong After Sorting

Feb 18, 2010

I have a problem with my references when sorting in excel. I have been searching for the problem, but did not found a useful solution.
I'm using excel 2003.

Let me try to explain my problem with a simple exampel.

I have a column with numbers and one with formulas pointing at these.
A B
2 =A1
4 =A2
3 =A3

Now I want to sort column A, and the column B should keep pointing at the original number. So I want this:
A B
2 =A1
3 =A3
4 =A2

But I get this:
A B
2 =A1
3 =A2
4 =A3

This output is what I would expect if I used absolut reference($).

Using offset(B1;0;-1) will work, but I cannot use this, since I will add/delete rows and the reference is not neccessarily next to it. Plus it can be a rather large sheet.

I cannot use dynamically name definition either, because it is intended for other users, and this will be too much work for them. What I basically need is a simple formula they can enter.

My sorting is done via a VBA macro, so if there is anything I can do through macro/VBA that will be okay as well, since I can do this without the user seeing it.

View 14 Replies View Related

Formula References Between Worksheets?

Dec 20, 2013

Column O is names and column P autogenerates email addresses with

=CONCATENATE(SUBSTITUTE(O2," ","."),"@company.com; ")

So, John Smith becomes

"john.smith@company.com; "

That's perfect. I want to move it to another worksheet. When I paste it to Worksheet 2, A1 I get

=CONCATENATE(SUBSTITUTE(Sheet1!O2," ","."),"@company.com; ")

So why does that only generate "@company.com; "?

View 4 Replies View Related

Vlookup References Between Worksheets

Dec 12, 2006

I have 3 Sheets (Sheet1, Sheet2, Sheet3)

Sheet 1
---------
ClassID

Sheet 2
---------------
AccountID, Fname

Sheet 3
----------------
FundID, FName

I want to match the value from Sheet3!FundID to Sheet1!classID and Add Corrospinding Sheet3!Fname value to Sheet2(Fname). I tried using VLOOKUP, MATCH & INDEX but somehow not getting the correct formula.

View 5 Replies View Related

Absolute References: The Sub Worksheets To Update Automatically

Aug 4, 2009

I have a workbook with a main worksheet where all the data entry and calculations are made and then I have "sub" worksheets which mirror subsets (specific columns) of the information from the main worksheet. When information in the main worksheet changes, or rows/columns are added, I want the sub worksheets to update automatically.

The only way I can figure out to do this is to use absolute references in the sub worksheets. Does anyone know how to change the references to be absolute (using the F4 function) without having to do them one by one? Or can anyone suggest how I can achieve this in another way.

View 3 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

Retaining Mixed Cell References When Linking Worksheets

Jan 3, 2008

I am linking a row of data in worksheet x to a column of data in worksheet Y and would like to be able to drag down the cell reference in worksheet Y in this way:

=MIN(RuleofOriginData!AR$4:AR$63)
=MIN(RuleofOriginData!AS$4:AS$63)
=MIN(RuleofOriginData!AT$4:AT$63)

However, when I drag it down, the formula is automatically absolute for both the row and the column number instead of just the row as I indicated. Can anyone tell me why this occurs and whether there is a way to fix it?

View 9 Replies View Related

Sorting Sheet That References Data From Other Sheets (Google Sheets)

Jan 25, 2014

[URL] ....

I want to sort the Inventory Checklist sheet based on Column D but it gives me nothing but references errors.

View 1 Replies View Related

Sorting SOME Worksheets Alphabetically

Aug 27, 2009

I have been looking at Macros that sort worksheets alphabetically, but there are sheets within my workbook that I want to leave static. I have two sheets, names 'Start' and 'Spacer', what I would ideally like to have is a marco that will alphabetically arrange the sheets between these sheets, leaving the others where they are and obviously leaving 'Start' and 'Spacer' at the front and end of the range respectivly!

View 5 Replies View Related

Sorting Into Different Worksheets From A Unique Value

Jun 20, 2006

Is there a formula I can use that would sort information from a master
sheet into up to 4 different worksheets in the same workbook? Right
now I'm engineering IF statements, but I've come across the problem of
blank rows. To get rid of this, I fixed the false value as "zzzz" and
then sorted (because when sorting with " " as the false value, the
values end up on the bottom of the worksheet) but when using the Find
and Replace option, it replaced the zzzz values in the formulas, which
defeats the purpose.

View 12 Replies View Related

Sorting Worksheets With Various Naming Formats?

Nov 25, 2011

I have a workbook with worksheets that are named in various ways that I need a VBA macro to sort.

Some sheets have names that begin with numbers.

I am able to get the macro to sort them all alphabetically but those with numbers are always put at the start of the work book instead of within the alphabetical format I want to use

I may have sheet names like:

CAT 3CAT 1CAT 2CAT MONKEY DOG 4DOG 3DOG

This is how I want these sheets sorted:

CAT 1CAT 2CAT 3CAT DOG 3DOG 4DOG MONKEY

The sheet names are examples and not actual sheet names.

Below is my code so far

Code:
For lCount = 1 To lShtLast
For lCount2 = lCount To lShtLast And Not IsNumeric(Mid(UCase(Sheets(lCount).Name), 1, 1))
If UCase(Sheets(lCount2).Name) < UCase(Sheets(lCount).Name) Then

[Code].....

View 2 Replies View Related

Sorting Info From A WS To Multiple Worksheets

Sep 30, 2009

Here's the issue: I have a spreadsheet with 12,000 contacts in it (name, email, phone number, country, industry, etc etc). The sheet is kind of messy, and I want to clean it up. One way thing I want to do is organize it. I want to sort the Master sheet into other worksheets, and I would like to do this Industry.

Is there a way to make excel register when a contact is in a certain industry, and then subsequently move that contact into a sheet? I tried playing around with If/Then functions, but I think this is a job for a macro/VB expert.

View 9 Replies View Related

Allow Sort, Sorting On Protected Worksheets

Aug 29, 2006

Is it possible to keep the sort icon available on a worksheet which is protected? I have issued a spreadsheet to colleagues which contains formulas so I have protected it, but I have now been informed that they need to be able to sort the data according to a ref number.

I thought of using code (which I'm not very good at) and used some from another excel document, but couldn't get it to work...the code was ....

View 9 Replies View Related

Avoiding Invalid Worksheet References?

Feb 25, 2014

I am combining the information from multiple files--one per state, for several states--into a single large table so it's more easily reviewed. Each file has multiple worksheets, named for categories. The category/worksheet names are standardized, but not all worksheets are found in every file.

There is some overlap of items from state to state, so my macro copies key fields from each worksheet and pastes them into the new table and adds a column on the left with the name of the category/worksheet each item came from. It then removes any duplicates to create a list of unique items. Across to the right, the table has two columns for each state, one to show if the item exists there, and the other the date it was added.

In the final step I am using lookup formulas to populate the states columns, using the category/worksheet name from the left-hand column to identify which worksheet to pull from. When a worksheet doesn't exist in a source file, however, this creates an invalid reference.

Is there any way to use VBA to identify which worksheets are in a file so I can use the results in an IF/THEN statement to bypass any lines that would create the invalid references?

View 2 Replies View Related

Lock External Worksheet References

Aug 3, 2006

I have an excel workbook we use for quoting jobs. All our pricing references are in another workbook on our network. I have reference in the 'quoting' workbook that refer to the 'pricing' workbook.

The trouble is, when some users open the 'quoting' workbook, and have another Excel file open, some references to the 'pricing' workbook change to the other file they have open.

I suppose there is some sort of replicable condition that is happening, but I can't figure out what is going on or why.

So my question is: Can I ' lock' an in-cell reference to an external workbook so that it NEVER changes?

I tried hand entering the reference (network location+workbookname+sheetname) into a cell and then referencing that cell, but I couldn't get that to work.

View 9 Replies View Related

External Worksheet References Conditional Sum

Apr 17, 2007

I am trying to use a conditional sum formula where the data resides in and external workbook. This is fine until I close the external workbook and the formula no longer shows the external reference. Is there a way of getting excel to use conditional sums in this way (or what is the best way of achieving this?)

View 4 Replies View Related

Sorting Certain Worksheets Based On Cell's Content

Jan 22, 2013

I have standardized each existing worksheets and any new worksheet to have certain parameters. The purpose of the Macro requested is ensure these worksheets are sorted alphabetically (and only these worksheets). The code I have been working with is contained below. It is working as expected but now I need to incorporate a statement which places the following condition:

Sort worksheets only if A3 has cell value of eCRF NameIgnore worksheet name: TOC & ENTER ECRF NAME

VB:
Sub Sort_Tabs()
'declare our variables
Dim i, j As Integer

[Code].....

View 5 Replies View Related

Linking Cells That Require Sorting, Between Worksheets

Mar 8, 2008

I’m having problems linking data from various worksheets to one master worksheet, all in the same workbook. The workbook contains swimmers PB’s (personal best times) for each stroke and after each gala the swimmers new time is entered onto the worksheet. The worksheet data is then sorted so that the fastest swimmer is at the top.

The master worksheet contains all swimmers by name (alphabetically) and their best times for each stroke, what I am trying to do is have the master worksheet update automatically when I enter the swimmers new PB’s in the individual stroke worksheets, this works when I use ’Paste Special’, but when I go to sort the data with the fastest swimmer at the top, the data in the master worksheet does not reflect the correct times.

View 9 Replies View Related

Sorting Worksheets By Name In Month Year Format?

Apr 4, 2012

I have a workbook which I'm using to collect monthly data. Each sheet (with the exception of a sheet called 'welcome') is named by month and year. Is there a way to sort these in chronological order?

View 3 Replies View Related

Recording Macro Using Cell References In Worksheet

Jan 18, 2007

I am working on this project that involves opening several Excel spreadsheets and copying the data into a new workbook. The problem is that the names of the various worksheets I want to copy change every day - it always reflects the date. I open 7 workbooks, go to the sheet named (for example)01.17.07, copy a static range and then paste it to a new workbook.

Is it possible to record a macro and use a cell reference in the destination workbook (the one I want to copy to) to tell it which worksheet to copy? So, for example, I would type 01.17.07 in cell A1 of the new workbook and the macro would look for the sheet named 01.17.07 when running? Then tomorrow, I could type 01.18.07 and it would know to look for a different sheet?

View 11 Replies View Related

Avoid Losing Worksheet References In Formula?

Jan 14, 2013

Is there a way to prevent formulae from losing their references when the references get replaced.

I have formula which refer to a worksheet that is dynamic, meaning that the worksheet holding the data (CONTROL_1) differs from one query to the next is imported from another source. The datasource contents and format are identical.

View 6 Replies View Related

VLookup On Table With Multiple Worksheet References

Jul 17, 2013

I have a question dealing with a variable column and cell reference I'm using. To make it simple here's what I have done. On the FRUIT tab I have the following table in location BU132 - BV161

Name Column
Apples A
Pears B
Corn 'VEGGIE'!A
Peas 'VEGGIE'!B

I'm using the following formula to get the location of a cell on both the FRUIT and VEGGIE tab that has the value.

=INDIRECT(VLOOKUP(CH61,$BU$132:$BV$161,2,FALSE)&CN61)

{where CH61-CH100 contains fruits or vegetables and where CN61 is a table that has the column reference which goes from 1 to 40)

This formula works great as long as the item is on the FRUIT tab. I can just drag the formula down the entire column and get my values for all the FRUITS listed in CH61-CH100. But, it doesn't work for any items in CH which are on the VEGGIE Tab. What syntax do I need to use in the cell next to Corn and Peas above to get this to work right?

View 2 Replies View Related

Excel 2007 :: Formula In Worksheet Contains One Or More Invalid References

Feb 7, 2012

Everytime I save my workbook, I get a dialog box that says:

"A formula in this worksheet contains one or more invalid references. Verify that your formulas contain a vlid path, workbook, range name, and cell reference."

First off, it say's "this" worksheet no matter what worksheet is active.

Usually the culprit is a screwed up name that has a #REF in it somewhere. Not this time. All of the formulas appear to be working fine.

Is there an audit feature that will find the errors for me? (Excel 2007)

View 3 Replies View Related

Copied Worksheet With Macros Still References Original Workbook

Oct 25, 2007

I have a workbook within which i have a worksheet that contains a lots of macro code (coded by me). As the workbook gets used by various people, i need to copy the worksheet and the macros across to the updated workbook, which doesnt contain the macro worksheet at all.

I have tried to copy it across by clicking on its tab and using the move or copy facility. This copies the sheet across as required. But for some reason, the macros all reference the old workbook. A small bit here for example for some reason opens up the old workbook and then performs the code in the old worksheet:

Sub SelectAll()
For i = 12 To 20
Set curcell = Worksheets("Form Generator").Cells(i, 3)
If curcell = False Then
Cells(i, 3).Value = True
End If
Next i
End Sub

As curcell is equal to worksheets...() i would have expected it to use the local worksheet, ie the one that the macro is attached to. So why is excel proactively hunting out the old workbook and sheet? is the method i used to copy across the sheet with the macros incorrect? If so, how should i go about it?

View 3 Replies View Related

Sorting To New Worksheet

Jul 15, 2009

I have a report to compile where i have a master list of data with three columns.

A=Name B=Type C=Location

I have 3 Types to sort. These being D, E, F

I need to sort into three new worksheets from the first sheet the D's into one, the E's into another and the F's
into the last.

I have over 3000 different A's to sort by the Type.

View 9 Replies View Related

Changing Hard Coded Column References To Variable References

Oct 22, 2009

I have a number of statements within the Sheet Event Code (Excel 2007). Three times lately I have added a column and had to go back into the code and find all of the references that needed changing to reflect the new column.

I have been working on this for a couple of days and even tried EE, but to no success.

I have read that Defined Names / Constants should be used as often as possible, but even trying that, the VBA code errors out or "hangs up". Even within Bill Jalen's book (VBA and Macros 2007), there is nothing that addresses this, especially using Intersect.

Private Sub Worksheet_Change(ByVal Target As Range)
Dim rng As Range

On Error GoTo mEnd
Set rng = Sheets("Log").[F14:F10000]
If Not Intersect(rng, Target) Is Nothing Then
If Target = "" Then
With Sheets("Log")

View 9 Replies View Related

Prohibit Sorting In A Worksheet

Oct 28, 2009

This might sound like a weird question, but is there any way to prohibit a user to using the sort function in a particular sheet?

Filtering for values is okay but sorting must be prohibited so that no rows "change place" in a sense.

View 4 Replies View Related

Converting Absolute References To Relative References In Formulas?

Feb 10, 2014

I set up formulas to count text characters in a range of cells. I'm tracking attendance and payments for a small yoga studio.

All I need to do is count "Y"s for prepaid attendance and "DI"s for drop-ins. I have the formulas working but they are absolute so inserting a row will break my sheet.

=COUNTIF(E14:Z14,"*Y*")
=COUNTIF(E11:Z11,"*DI*")

View 1 Replies View Related

Structured References And With Cell References I Get A Column Of Zeros

Nov 25, 2007

It is suppose to be that if the employee is "FT" and has worked >=4 years the return is 15. But if the employee is FT and has worked 2 years but less than 4 years then it is suppose to return 10 (these are days off) Or if the employee is FT and has worked 1 year, but less than 2 then it should return 5 days off. And all the others in the column get no days off.

I have tried to do it with structured references and with cell references I get a column of zeros!

View 9 Replies View Related

Sorting In WorkSheet Based On First Two Digits

Jan 13, 2008

how to sort based on the first two digit..

I need to sort the COMM CODE ( which is at Column no 3 )

View 14 Replies View Related







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