Use A Worksheet Reference Cell In A Formula?

Apr 10, 2014

I have a formula to extract the worksheet name and add the "!" to it so it can be used in a copied formula... I'm just having trouble writing the formula to reference the text in the cell with the worksheet name. If it's easier, I also have the list of worksheets without the "!" - e.g., Sheet1, Sheet2, Sheet3, etc...

I want the formula to calculate, in my example, the sum of 2 cells on a different worksheet.

View 6 Replies


ADVERTISEMENT

Convert Cell Reference To Worksheet Reference

Jul 20, 2014

I have a workbook with 1000+ worksheets, all of which have 3-letter names. On a master sheet, I would like to make a query of how many non-empty cells there are on a subsidiary worksheet. This works:

Code:
=COUNTA(ABC!A:A)
What I'd like to do from time to time is input in column A a varying set of 3-letter worksheet names, say

AAB
ABC
CDE

And have a formula in column B that converts this to

=COUNTA(AAB!A:A)
=COUNTA(ABC!A:A)
=COUNTA(CDE!A:A)

I've learned that simply substituting the cell references A1, A2, A3 for AAB, ABC and CDE doesn't work. What do I need to do to achieve this?

View 2 Replies View Related

Circular Reference: Cell References In The Formula Refer To The Formula's Result, Creating A Circular Reference

Aug 14, 2006

I have the following formula in cell L51 of all sheets calculating the volume depending on the monthly index that is chosen from the drop down menu in a particular sheet. =If(MIndex=0, SUM(D33:L50),If(MIndex=1,SUM(D34:L50),If(MIndex=2,SUM(D35:L50), 0))). I am getting the following message and I do not understand what it is about.

Microsoft Office Excel cannot calculate a formula. Cell references in the formula refer to the formula's result, creating a circular reference. Try one of the following

View 3 Replies View Related

Add Formula Reference To Another Worksheet

Dec 27, 2007

I have a worksheet that changes monthly but has the same fields always. I have created a few macros, and one that is a 'RunAll' for ease of use. Sometimes there is an error and I have to go back and fix some data, So I am looking for a way to change the "SelectBzzAgent" Macro to link data to a new sheet instead of copying. I have attached my spreadsheet.

View 3 Replies View Related

Formula/Macro To Reference From Other Worksheet

Oct 8, 2009

Maybe it's not as complicated as i'm thinking, but i'm trying to figure out a formula (or macro) that will let me basically fill in a blank from a (nearly) irrelivant second worksheet. The only similarity the two will have is a PO number, or in my picture diagram, it's a letter. The worksheet that i'm trying to fill in the blank from has maybe 1500 entries, the worksheet i am referencing to has roughly 11,000, so sorting it would make no difference and the columns would be very inconsistant with eachother, but the rows will be similar.

I want to start a formula in Sheet one, that looks at the Letter in that same row, finds that Letter in Sheet two, and gets information from the same row but a few columns over. I might be explaining this poorly, so here's a picture of what i'm referring to. I'm trying to fill in F6 in Sheet 1 with information from F2 in Sheet 2.

View 5 Replies View Related

Copy Formula To Reference Next Worksheet

Feb 20, 2007

I have my inventory based in excel. Each brand has it's own file. Each file has several worksheets with all of the items, prices, etc. on them. When I get a shipment, I fill out the next worksheet in line. This way- I have a record of my inventory and a worksheet for each shipment. It has been working very well. The first worksheet in each file is a summary page that shows me the grand totals, shipping charge, etc. from each filled in worksheet page. the problem is I have to build that summary page for each worksheet I fill in.

I would like a way to tell excel to give the same information as I requested in the previous row, but the next worksheet down.

View 14 Replies View Related

Correctly Reference Worksheet In VBA Formula

May 5, 2014

I am trying to use a match function to determine which row information resides on so that I can update other information on that row but I am having problems setting up the match function.

The information is obtained from a combobox on a user form which identifies the correct address and then additional information is added to other fields on that line in the spreadsheet. PropertyListAll is a dynamic named range looking at the first column in the spreadsheet. the data starts in row 11.

My code is as follows, but I am getting error message 438. I am assuming I am referencing the workbook and named range incorrectly but I have tried various different combination all to no avail.

Code:
Dim wb As Workbook
Dim ws As Worksheet
Set wb = ThisWorkbook
Set ws = wb.Worksheets("Team Vals - Take ons")
rownumber = WorksheetFunction.Match(cboProperty.Value, ws & "!PropertyListAll", 0)
Sheet1.Range("tblTakeons").cells(rownumber, 2).Value = txtDate.Value

View 6 Replies View Related

Change Formula Cell Reference Based On Another Cell Reference

Jan 8, 2012

How do I change a formula cell reference based on another cell's reference? I'm building a schedule that looks to a task's trigger and adds days based on that relationship. All entries in column "A" will be text and all cells in "B" will be the simple formula "=A2" or "=A3". Due date is calculated by adding the value in "C" to the preceding date in column "D". In the spreadsheet below, the trigger for "Budget set" is "Specs written" with 3 days added to the previous due date.

________A________________B_____________C_________D
1 Task___________Trigger_____________Days_____Due Date
2 Design begins__Proj OK______________10____10-Jan
3 Specs written__Design begins (A2)____5____15-Jan (D2+C3)
4 Budget set_____Specs written (A3)____3____18-Jan (D3+C4)

If the trigger for A4, "Budget set", changed from A3 to A2, is there a way that the formula that determines the due date in D4 could read the trigger cell reference in B4 so that the value in the corresponding row in column "C" is added in the date column?

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

Formula Reference Cells & Ungroup Worksheet

Oct 21, 2007

"Enter a formula that adds the total gross sales for the first quarter in cell B6 in the Q1 worksheet and total gross sales for the current quarter in cell G18 in the Q2 worksheet"

**First ungroup the grouped worksheet

How am i going to formula a total gross that i don't even know what is the first quarter? i don't see anything for first quarter? and in Q2 worksheet G18 i already did =SUM formula Ungroup the worksheet? i don't think my worksheet is even group?? how i ungroup it?

View 14 Replies View Related

Copy Formula To Different Worksheet & Reference That Sheet

Oct 22, 2007

Currently I have a worksheet which is organized to have two pages on it. I will try to explain, i.e. imagine one page of the worksheet in the hypothetical range of A1:D26, then another page in the range E27:K50. So it is staggered on the same sheet. Is there an easy way to copy the range of E27:K50 onto another worksheet.

Aside from the regular copy and paste, I am having problems because there are formulas in the 2nd range (E27:K50) which loose their references once copied.
i.e the formula SUM(A1:A10) I would like to be SUM('Master List'!A1:A10) on the new sheet. Is there an easier way then going through all the formulas and adding the master list part.

View 5 Replies View Related

Cell Reference :: Formula To Reference New Cells

Feb 15, 2010

I have lets say 12 months of data. I have formulas that reference the latest 6 months. When I insert a new column to input a new month, how can I make the formulas include the new months without manually updating them.

EXAMPLE:

12 months of data exist in cells B3:M3 going from B3(oldest) to M3(newest). Formulas reference latest 6 months of data in cells H3:M3. When a new month hits, I insert a column after column M.I would like the formulas to now reference cells I3:N3 which is now the newest 6 months.

View 14 Replies View Related

Macro - Paste Formula Into Another Worksheet Using Active Sheet Name As Reference

Jan 9, 2014

I'm using a macro to paste a formulae into a destination cell on another worksheet.

The problem is that I need the Macro to put the name of the active sheet into the formulae

VB:
Sheets("Front").Select
Range("E1").Select
Selection.End(xlDown).Select
Range("E3").Select
ActiveCell.Formula=INDIRECT(ADDRESS(MATCH(9E+99+306,*****ActiveSheet.Name*****!F:F,1),6,4))

The macro has to work whis way becuse I will be using it with multiple worksheets, all with different names.

View 9 Replies View Related

Change Table Array Reference Without Changing Formula In Every Worksheet?

Jun 25, 2014

i want to change the table_array reference without changing formula in every worksheet. I tried using a new worksheet and naming it the same as what is referenced in vlookup table_array but it messed up all the data.

I have to use a different worksheet every month so need a way to change reference OR how to change array data without messing up the worksheets with the vlookup

View 9 Replies View Related

Using Cell Value To Reference Worksheet Name?

Aug 5, 2014

I have a worksheet with additional worksheet name listed in Column G, starting in G3.

I want to run this formula on each sheet, using the value in Column G as the WORKSHEETNAME.

=COUNTIFS(A7:A1000,">12/31/2010",A7:A1000,"<1/1/2012",F7:F1000,"Excluded")

Faulty example of what I'm trying to do:
=COUNTIFS('WORKSHEETNAME'!A7:A1000,">12/31/2010",''WORKSHEETNAME'!A7:A1000,"<1/1/2012",''WORKSHEETNAME'!F7:F1000,"Excluded")

I've tried INDIRECT, but I cant seem to make it work.

View 4 Replies View Related

Excel 2007 :: Formula To Return First Cell Reference In Another Cell Formula

Oct 1, 2011

Version: Excel 2007 WinXP

I'm basically looking for something almost like an inverse function to INDIRECT. This function would first look at a cell's formula as a text string, parse out the first valid cell reference in A1 format, and return that cell as a text string.

Detail: I have a spreadsheet with cells that point to other values. I would like to get only the row number from the first cell reference in the formula residing in a given cell. For example:

Suppose A1 has the formula =AL267. and A2 has the formula =SUM(AL94:AL235)

I would like a formula in B1 that returns the text string, "AL267" so that I would know this is the first reference.

Ideally it could be dragged down to B2 such that it returns the text string "AL94" (and not "AL235") because AL94 is the first cell reference in A2's

Currently I am copying the formulas after hitting ctl+` and pasting that text into a text editor, followed by text operations to manipulate the results into the desired values. Any solution that didn't involve going out to notepad.

View 2 Replies View Related

Reference Cell On One Worksheet In Right Footer Of Another?

Jan 7, 2014

Been having some trouble with this using VBA. I can't seem to get the code to run properly.

Actually, if there is a way to get a right footer on one worksheet to be referenced in a cell on another, that would be even better but I haven't been able to find anything like that.

View 2 Replies View Related

VBA Code For Using Cell Value To Reference Worksheet Name

Jul 15, 2014

I need a VBA code to reference the cell value to activate a particular worksheet name. In the sheet "Ini", Range ("B4"), there is a text of "Rawdata" This text is used to reference to the specific Sheet name and activate it.

However, I am unable to get my code to work. Thus, I changed it with a ' with green highlights for the following lines:

'Worksheets.Open Filename:=DataRawSheet
'ActiveSheet.Range("A1").Select
Reference_Cell_to_Sheet.xlsm

View 4 Replies View Related

Reference Cell From Another Excel Worksheet?

Dec 6, 2013

I've done this loads of times before but doing it this morning seems to not be working at all.

Previously I'd be in Sheet 1, I put the equals sign, I click into Sheet 2 in the cell I want, hit enter, and hey presto the external cell is referenced in Sheet 1.

However, what I'm trying to do here is not reference individual sheets within an excel document, but reference a totally separate Excel document. Can I do this or not?

If so how? Because when I select the second worksheet after I've entered the = sign, it just takes me to the second sheet - it doesn't seem to 'remember' that I'm in the middle of a formula.

View 4 Replies View Related

Reference Worksheet Cell In Workbook

Aug 12, 2006

I have recently learned a little about Excel. Enough to be able to do our payroll for my company on it. My question is: On the 1st page of my workbook, is my quarterly report which shows all taxes, social security, and medicare we hold out each payday for each employee. The rest of the worksheets are for each employee. How do I have each employees withholdings automatically go to my quarterly report page?

View 5 Replies View Related

Sumif - Reference To Cell On Another Worksheet

Feb 27, 2007

I'm trying to reference a cell on another worksheet in my criteria and the formula doesn't seem to be working. All I get is a value of 0.

= SUMIF(G3:G76, ">='City Wide'!B6",I3:I76)

If I replace 'City Wide'!B6 with an actual number the formula works. This does not help as 'City Wide'!B6 is a value that can change.

View 4 Replies View Related

Open A Closed Worksheet W/ Cell Reference

Jan 4, 2010

I am trying to open a stored file on a network drive (with the file location stored in cell E4). When I try to run the macro, I get an error message on Line 3. (Sheets(E4.Value).Activate)

Does anyone know what I can do to fix this, or have a better method to open the closed files?

I've read that it's possible to reference information from a closed sheet, but I don't think that I'm experienced enough in VBA to take on that effort yet.

View 7 Replies View Related

Using A Cell Reference To Copy Rows To A New Worksheet

Jun 14, 2006

I've been tasked with redoing a revenue report at work, and in my head I've conjured up what could potentially be a huge time saving way of doing things in the future, although have searched help files and looked around online and can't find the formula/macro (if it exists) to enable me to do this.

The problem is this:

Sheet 1 of the workbook is a large input sheet. Every row contained in that sheet will, in column A, be titled 'red', 'yellow' or 'green'. Columns B onwards contain other data which (at the moment) is irrelevant to the problem.

Now what I want excel to do after I've put the raw data into the input sheet (sheet 1), is to read the text in column A for each row, then automatically copy ALL data in that row over to the next empty row on another worksheet.

ie Sheet 2 will have all rows that have 'Red' in column A on the input sheet, Sheet 3 will have all those titled 'Yellow' and Sheet 4 will have all those titled 'Red'.

I know I can use a filter on the input sheet to just show the data I want, but each colour coded row will contain different data to another, and if there is a formula/macro setup i can use to do the above, then I can set the subsequent worksheets up to hide the superflous columns from the input sheet.

View 9 Replies View Related

Reference Cell For Worksheet Name Macro Code

Apr 11, 2008

I've got 3 sheets, A, B, and C. In sheet C, I have a cell named "element". That cell can have either the letter A or the letter B in it. In my VB code, I want to reference the sheet which correlates with the "element" cell. So,

Worksheets("element").Select

when the user clicks my "go" button, it calls this logic, and I want the worksheet that correleates to the letter in the cell in worksheet C - to open.

The reason for my posting - this is not working, and may not even be possible. Perhaps someone has experience in this and knows how to do it - or knows a different way to do this.

View 4 Replies View Related

Highlight Cells Based On Cell Reference On Another Worksheet

May 27, 2014

I am trying to find a way to automatically highlight all the cells specified by the cell references in a column on another worksheet (which will constantly have new values added).

On the attached sample, the 'Data Before' tab shows the base data before any highlighting. As cell references are added to the 'References' tab in 'column A' I want the respective cell to be highlighted on the 'Data Before' tab resulting in the 'Data After' tab and each time a new cell reference is added to the 'References' tab, the respective cell is then highlighted on the 'Data Before' tab.

I would like to have control over the highlight colour so that a different highlight colour can be specified for each date change, i.e. all cell references that are shown on the same date are the same colour but where the date changes a different highlight colour can be specified.

Highlight by Cell Reference.xlsx‎

View 9 Replies View Related

INDIRECT - Sum Contents Of Column On Another Worksheet Up To Certain Cell Reference

Jan 24, 2012

Trying to use INDIRECT to sum the contents of a column on another worksheet upto a certain cell reference which is in another cell on the worksheet.

=SUM(INDIRECT("Sheet1!A4:Sheet1!"&B1))

I have taken it back to simply having sheet1 with numbers in A4 to A23, then sheet2 with A23 in cell B1, and the formula above it C9, but I keep getting #REF!.

The formula works fine if on sheet1 without the worksheet names in it. Formula evaluation gets to =SUM(INDIRECT("Sheet1!A4:Sheet1!A23")) then gives =SUM(#REF!)

View 6 Replies View Related

VBA Script To Create Excel Reference To A Cell In Different Worksheet

Dec 18, 2013

I am trying to create a budgeting spreadsheet that contains 26 worksheets that represent 2 week expense cycles. The worksheet will tally all the expenses in its 2 week cycle, compare them to a target budget, and calculate the remaining budget. I would like to roll the remaining budget over to the next 2 week budget cycle by having a cell refer to the remaining budget in the previous worksheet.

I am trying to accomplish this using the following VBA script. I get an error (Run-time error 1004: Application-defined or object-defined error) on the 3rd to last line of the code. I think the issue is with how I am constructing the wsReference variable. I have seen other codes do something similar (VBA - How to refer to a different worksheet cell) but I am not having any luck.

Sub Budget_Rollover()
Dim i As Long
' Loop through all the worksheets, starting with the second sheet
For i = 2 To Worksheets.Count
Dim wsReference As String
Dim wsName As String
' Define the name of the previous expense cycle worksheet

[code]......

View 2 Replies View Related

Macros To Save Worksheet Based On Cell Reference

Feb 12, 2009

I have a macros ( code inserted ) as you can see in my code the macros save the workbook in any file name you chose just by changing the any filename option.

I would like this to be changed so that it saves based on a cell reference, say i has a name in lets say B10 i would like it to save as the name in B10.

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.DisplayAlerts = False
Dim bk1 As Workbook
Dim bk As Workbook
Dim myfilename As String

View 9 Replies View Related

Macro Used Textbox In Worksheet Rather Than Cell Reference As Criteria To Find Matches

Sep 26, 2013

This is a continuation of thread 182629 [URL] ....

The End User wanted originally to type characters into cell C1 of a worksheet that the macro searched for in another worksheet, copying across every row containing the input.

The responses gave me the following code which worked perfectly:

VB:
With Sheets("PICKLIST")
myFind = "*" & .[c1].Value & "*"
End With
If myFind = "*" & "" & "*" Then Exit Sub

Unfortunately, the user NOW wants a Text Box instead of putting the characters into a cell.

I added a textbox (originally called 'TextBox2' but renamed "Choice") and "Dimed" CHOICE As Range.

Then tried the following code:

VB:
With Sheets("PICKLIST")
myFind = "*" & CHOICE & "*"
End With

But it generates a "RunTime Error 91" - Object variable or With block variable not set.

View 8 Replies View Related







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