I want to sum A2 to B10. The catch is: I have the letter "A" in cell A1, the number "2" in cell B1, the letter "B" in cell C1, and the number "10" in cell D1. In effect, I want to make a function =SUM("A1B1":"C1D1") such that it gives me =SUM(A2:B10). Hopefully, the answer will work for any function (e.g. SUMIF, COUNT, VLOOKUP, etc).

I am running a research experiment in triplicate. Upon generation of data for all three, I create an averaged value of the three. I then take this value and do more calculations with it on a separate sheet. I wanted to know if there was a way in which I could quickly generate formulas based on a changing reference cell.

Example Data:

V1A 28 V2A 26 v3A 30 AvA 28

V1B 20 V2B 22 V3B 18 AvB 20

Vxy represents the value of y sample, x triplicate. V1A being sample A, first triplicate. AvX is the average of the three values.

I want to be able to generate a formula that references AvA which can be applied to the cell immediately below to reference AvB. A simple example would be to square the average.

As you would normally use indirect formulas so the cell references don't change. Which that is what I want in the end, but I need to copy them to an indefinite number of cells first and would like to not do it by hand. I have found some solutions to similar questions/problems but cannot figure out how to make them work for me. So, what I am looking to do is this... (I have also attached the spreadsheet for reference)

I have gotten the information in columns A through F on the first sheet to update as rows are added, moved, deleted on the second sheet using Indirect range. Also, I could do this for Column I (Copmleted Proj. Avg. Terminations) but I would have to do it manually (as I began doing in I3, I4 & I5) but that would be time consuming. So I am hoping there is a way I can copy the formula down the cells are updated for the initial copy but then don't update if the referenced cells are moved or deleted.

I am try to get the following VBA macro to work; however, I keep getting hung up on errors regarding the formula I am trying to input. It is getting hung up on the apostrophes and dollar signs. I am fairly new to VBA so I am lost when it come to converting my sheet formulas to VBA.

Code:

With ActiveSheet.UsedRange.SpecialCells(xlCellTypeBlanks) .Formula = "=RAND()*0+VLOOKUP(INDIRECT(ADDRESS(1,COLUMN(),3),TRUE),INDIRECT("'"&TEXT(INDIRECT("$A"&ROW(),TRUE),"DD-MMM-YYYY")&" Inv'!"&"$J:$K",TRUE),2,FALSE)" .Value = .Value End With

I began to ponder a way to copy down cells so that the copying of the formulas results in references as shifting horizontally instead of vertically. One particular reason that this occurred to me had to do with my attempting to use Excel to make more orderly text copied from Adobe.

So, for example, if I copied text from Adobe, I would paste it in Excel. Thirty lines of text would past vertically into a column, from Row A1 to Row A30, with each line of text in its own row. I wanted to figure out a way so that in adjacent columns, I could put it so that I would have a set of formulas reading in =A1 in Column C cell/row 1, =A2 in Column D cell 1, =A3 in Column E cell/row 1, =A4 in Column F cell/row 1, =A5 in Column G cell/row 1, and so forth. I realized that if I copied this down, in the second row, the result would entail references to A2, A3, A4, A5, A6. I would prefer that the references update to A6, A7, A8, A9, and A10.

I am using vlookup to get a cell value from another sheet, but if the cell has "&" or "/" I need to substitue "&" and "/" with "and" so that the cell can be added later to a url.

i am using =VLOOKUP(a1,Sheet2!A1:W17968,6) to get the value of a1 in sheet 2 and return the value of column 6

this will return "Audio Cables & Leads" but i need it to say Audio Cables and Leads

I need the formula to also check and replace "/" with "and" as well so cables/wire will be Cables and wire

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")

I have a worksheet that will be referencing data from a 2nd open workbook. Although the 2nd workbook will contain common worksheet names (eg stats), the file name will be volatile.

Consider the formula in wb ws1 cell A1 used to copy a value from wb2 (39961(28-May-09).xls) ws1 (stats) cell B1 if workbook 2's name was static.

='[39961(28-May-09).xls]Stats'!$B$1

In my case, the reference file will always be different and must be substituted in the forumla above (red portion). How can I adapt my formulae recognize the available workbook. I have the file name available now in cell C4 of WB1.

I have a spreadsheet that imports data from a database and into pivot. Several departments use that spreadsheet, but depending on the department, they may want to see e.g. 3, 4 or 5 different fields than other departments.

My spreadsheet also includes a great number of formulas included in a macro, so whenever I get a request to include field X, Y and Z, I end up spending a lot of time adjustning all my formulas to reference the new fields.

I am trying to code the following in VBA. Excel Cells have formulae like: '=+BZ165-BZ163-BZ162-BZ160-BZ159-BZ157-BZ153'. Now I want to write code in VBA which will be able to give me the individual cells referenced in this formula: BZ165, BZ163 etc. These names can be stored in individual variables or arrays. I will then use these for further processing. Note in cases where formula refers to data in another sheet like: '=Projects!P49' or data in another excel like '='C:Documents and SettingshoskopDesktop[Annual.xls]Quarterly'!BA$502': I would like to store the path , file name and sheetname in variables/arrays as well. Any pointers as to how I should approach this problem?

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.

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!

I have a userform that populates a list of names. As a name is added in column "D" column "C" updates a reference number using the formula =IF(D2="","",C1+1). I can get the formula to copy to the spread sheet but as a new name is added the formula stays the same. If I enter a name in cell D2 everything is fine but when I make the next entry in row 3 the same formula is entered as if it were text and not as a formula. so I wind up with a column of formulas that all say =IF(D2="","",C1+1) reguardless of what row the formula is in.

I am working with some fairly long formulas and I am looking for a way to highlight those cells AND work in the document. I know you can click in the cell and it will highlight them, but if you click off the cell the highlights go away. Is there a way to keep them highlighted?

I have a "CURRENT MONTH" tab in a workbook; in that Workbook, I have a standard report that pulls Total Revenues from cell C6 of the tab I want to reference.

For example: In my "CURRENT MONTH" tab B6 has the label "CURRENT MONTH REVENUES" C6 has the formula "='May 08'!C6"

Every month I have to change that formula to "='Jun 08'!C6" as an example for June. (it's not just one formula, there are dozens referencing May that I need to change to Jun).

I could do an Edit/Replace, but I'd rather just type in the current month tab name in another cell and have the formulas pulling the data referencing that cell.

I have noticed that if I create a row and put a reference formula in one of the cells (i.e. in Cell B3 I have "=B4", to show contents of B4), then after I do Sort and Row 3 moves else where, formula in what used to be B3 no longer points to B4, but rather to B<new row + 1>.

Absolute reference doesn't seem to be an option (i.e. "=$B$4") since after sorting rows in question the cell references in my B cells do get screwed up. I guess I want to bind a certain cell to a certain other cell, and keep that bind no matter where I move the row.

I'm using a macro to update individual formulas in a sheet that contains data from external documents. (i.e. ='C:September[Book2.xls]Sheet1'!$AZ$1 + 'C:September[Book3.xls]Sheet1'!$BA$1 ) Every quarter I have to change the column references in this formula (i.e. $AZ$ will become $BD$ and $BA$ will become $BE$ and so on). Also I have to change the September reference to December etc (but I've mastered this already). My current code works well, but requires manual updating:

My problem with this method is that I need to automate the updating of ColumnReference1 = "BD" to ColumnReference1 = "BH" to ColumnReference1 = "BL" and so on and so forth. It's handy that the reference shifts across 5 columns, which remains constant. Ideally, I'd like to tell the macro to look at "AZ" then add 5 columns.

I have a rather complicated workbook with many VBA formulas. When I close it down a window displays "A formula in this workbook contains one or more invalid references". verify that your workbook contains a valid path, workbook, range name, and cell reference.

This only happens when I close the workbook. I seem to have all functionality. How can I find the invalid reference.

I want to copy =d8*k10 into several cells, but the references keep changing. I've tried several things that I've found on the internet, but nothing seems to work and the I can't seem to copy to a columnof cells.

I am writing a VBA macro in excel. I have several sheets in this one workbook........one sheet for each day in a given month. Sheets for each day are labled as 3_1, 3_2 for march 1st and march 2nd respectively. I also have 4 sheets for the 4 weeks in a given month. The weekly sheets are labeled week1, week2 etc....

What i am trying to do is this:

In the week1 sheet i am trying to "put" a formula in say cell 9,12 which sums up the same cell in the first 7 days of the month. But i am having issues. Does anyone have a good way to do this via VBA?

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.