Constant In Formula To Change Based On Cell Value

Jan 3, 2008

I am creating on the fly an array (2 columns) in which the one row cell is mathematically derived from its neighbor (A left-hand cell). However, when the mathematically derived product exceeds a value, the row neighbor changes to another constant until its neighbor's product exceeds another value, etc. Can I create such an array without resorting to VBA?

View 9 Replies


ADVERTISEMENT

Detect If Cell Contains A Formula Or Constant

Dec 4, 2007

I need an equation that lets me determine whether a cell contains a static constant value (either a string or a number), or an equation that generates a value.

Problem: I have a cell that contains a default equation that generates a default value, depending on a few conditions. The user can overwrite this cell with a constant. In another cell I need to know whether that cell is still the default equation or a new constant value.

I cannot simply test the value of the contents to see if they match my default, because the user may choose to enter that value.

View 9 Replies View Related

Formula To Determine If A Cell Has A Formula Or Constant

Nov 17, 2006

In cell A1 exists data. In cell A2, I would like to test A1 to determine if A1 is a formula or a constant.

Examples:
=A9+3 would result "formula"
="1+3 would result "formula"
3 would result "constant"
'Blahblah would result "constant".

View 9 Replies View Related

Determine Whether Cell Is Formula Or Direct Input (constant)

Jan 28, 2013

I have a template with formulas calculating a default value, but still allowing the user to override the cells with direct input.

I want to use conditional formatting to highlight any cells that have been overwritten, but can't find a way for Excel to differentiate between a cell with a formula or an inputted constant.

I realize there is a VBA "isFormula" function, but I don't want to have to use VBA for this.

View 7 Replies View Related

Change Formula Based On Cell Value In A1

Apr 21, 2007

= SUMIF(SHIPPED!$A$3:$A$13,A2,SHIPPED!$B$3:$B$13)

I would like for the formula to change to what is in A1.. If I change A1 to C, I would like for the formula to replace A with a C in the formula.

SUMIF(SHIPPED!$A$3:$A$13,A2,SHIPPED!$C$3:$C$13)

View 5 Replies View Related

Change Cell Formula Based On First 2 Numbers Of Another

Apr 17, 2009

Would anyone have a script for something like this?

I'm looking at range c5:c1200

Starting at C5

If the first 2 digits in that number start with 01 then I want the formula to be in G5 = F5*12

if the first 2 digits are 03 then I want G5 = F5*24

I have several of these if statement to put in However I need it to check the entire range as well because the formula may be different in each cell (G)?

View 14 Replies View Related

Change VLookup Formula Based On Cell Value

Mar 6, 2012

I have one sheet from which work is assigned to 10 different employees. Its format is something like the following:-

document number assigned to status remarks
12345678 john
45678910 steve
11247511 john

The individual sheets are then saved and assigned to all the employees.

document number assigned to status remarks
12345678 john approved
11247511 john denied info req

Now I want to update the data in the sheet by something like this

document number assigned to status remarks
12345678 john =vlookup(A1,[empname.xls]Sheet1!&A:$D,3,0)
45678910 steve
11247511 john

I got to know that indirect can be used for this.

View 1 Replies View Related

Formula To Change Date In One Cell Based On Text In Another?

Jan 29, 2014

I am trying to put together a report tracking sheet, ie I have different test that take a different length of time to return to the office and I want to be able to see when a test should be back from the lab,ie:

A blood sample takes 1 day, a urine sample takes 3 days.

I need a formula that basically says that if the data in cell A1 = Blood, (and I have the test date in cell A2) then the data in cell A3 should says A1=Blood, A3=A2+1 to give me the test due date

I found the following formula in one of the other posts;

=IF(E5="BLOOD",G5+1,IF(E5="URINE",G5+3,0))

The problem that this will only work with two tests and I have more than two tests, I have fourteen and each takes a different length of time to process.

View 7 Replies View Related

Change Goals Each Item With Constant Variable

Oct 22, 2013

I have goal table on table A and i want it data fill to tabel B with constant sum. maybe like sudoku in sum right and sum down.

View 1 Replies View Related

Constant Variables - Declare Name In Separate UserForm As Constant

May 8, 2012

I have a userForm (Form1) that contains a persons name that I would like to reference in a separate UserForm (Form2). In the separate UserForm (Form2) I need to reference this persons name many times, so I was wondering if there was a was to declare this name in the separate UserForm (Form2) as a constant. Only thing is that a constant, to the best of my knowledge, must be an expression and not a variable. Mainly, I'm trying to avoid declaring the myName variable in each Sub within Form2, which it will be needed for a ton of Sub's.

Code for Form2: Const myName As String = Form1.txtName.Value

View 5 Replies View Related

Moving Data Based On Constant

Oct 8, 2011

I have a list of data which which has repeated supplier numbers in column A. For instance

A123
A123
A123
X456
x456
x456
x456

The information in other 13 columns is variable and I need to be able to move all the rows which start with the first supplier number to another sheet which I will rename to that name, then move the second set of supplier numbers to a second sheet etc. So in my above mini example I would have one sheet named A123 with 3 rows of data and another sheet named X456 with 4 rows of data.

The number of supplier codes will be different every day and the number of rows within each supplier number will also vary. Each new datafile that comes in daily creates a new file do I do not have to worry about existing values only what the current file contains. I have used the following code to move data based on a known constant before but dont know how to tell the macro "move all the data while the value stays the same"

Sub DiffOrderNo()
Dim totalrows As Long, row As Long
Cells.Sort Key1:=Range("A1")
totalrows = ActiveSheet.UsedRange.Rows.Count

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

View 3 Replies View Related

Copy Formula With 1 Constant Value?

Oct 6, 2011

If I have a formula that I want to copy throughout a column, but I want to keep one of the parts of the formula constant, is there a short way to do this?

For example:

First cell is A1*O24
Second Cell is A2*O24
Third Cell is A3*O24

Right now when I try to copy the formulas, the second cell always reverts to A2*O25, which is not correct.

View 2 Replies View Related

Using Variable Instead Of Constant In VBA Formula

Jan 8, 2012

I try to adjust chart range using variable value instead of constant value.

My current code :
ActiveSheet.ChartObjects("Chart 4").Activate
ActiveChart.SeriesCollection(1).Values = "='Check_2G'!$Z$2:$Z$32"

I need to make range ( "='Check_2G'!$Z$2:$Z$32" ) adjestable with varible like m instead of 32 in previous code.

View 2 Replies View Related

Calculate Balance To Zero Based On Constant Fix Rate & Withdrawals

Feb 5, 2008

I have a situation where I have to determine the required size of a deposit from which constant withdrawals are to be made until the deposit runs out to ZERO. The deposit earns interest at a fized rate, capitalized monthly after each withdrawal had been made.

In my example case, the target month (The actual cell that needs to have a value of ZERO (when the deposit runs out), or the "Range") is found in cell G16. In another situation, it may be found in cell G19 etc, depending on the situation.

It is this changing of the target cell (the one that needs to be ZERO) that has me stumped. I've been thinking of using VLOOKUP (not trying to lead you ;-)) to determine the actual position of the cell that need to have a value of zero but do not know how to build this into the VBA code of Goalseek. This target cell in the Goalseek code should be the cell in column G opposite the figure 1 in column A.

In my example I simply typed in a figure 1 in column A - in the actual spreadsheet the position of this figure is calculated with a formula and its position moves from situation to situation. If the 1 is in cell A19, the target cell, whose value should be ZERO, will then be cell G19..............

View 2 Replies View Related

Pasting Constant Formula Where Referral Sheet Changes

Jan 1, 2006

I am creating a data tracking workbook. Information is entered into cells on
different sheets, then the tallies are pulled to one easier to read sheet.

In creating the tally sheet, I am setting the cell formulas. The cells
referred to are constant, only the sheet referred to changes. For example,
the cell might read

='FP 1'!$I$25

and the next one should read

='FP 2'!$I$25

....and so on. I would like to be able to paste the formula and have the
referred to sheet change so that I do not have to go through and make
hundreds of little changes.

View 10 Replies View Related

Replace A Constant With A Variable In An Array Formula.

Oct 1, 2007

I have the following array function that I am trying to get to work properly:

ActiveCell.FormulaArray = "=SUM(IF(NCR!O2:O100=39326,NCR!Q2:Q100,0))"
39326 is the value of 9/1/2007, and this formula works properly.

I am looking for a way to use this formula but replace 39326 with whatever date is in the first row of the same column as the active cell when it is run.

That is, if the macro was run with cell B8 as the active cell, "39326" would be replaced with whatever value was in cell B1.

View 9 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 Can I Copy A Formula To New Rows So That Some Values Remain Constant?

Feb 25, 2009

I have used the following long but simple formula.

=SUM((B17*B14)+(C17*C14)+(D17*D14)+(E17*E14)+(F17*F14)+(G17*G14)+(H17*H14)+(I17*I14)+(J17*J14)+(K17* K14)+(L17*L14)+(M17*M14)+(N17*N14)+(O17*O14))

I need to copy it to numerous other cells. However I need the row fourteen values to remain the same while the other values change according to which row I'm copying it to e.g

=SUM((B20*B14)+(C20*C14)+(D20*D14)+(E20*E14)+(F20*F14)+(G20*G14)+(H20*H14)+(I20*I14)+(J20*J14)+(K20* K14)+(L20*L14)+(M20*M14)+(N20*N14)+(O20*O14))

Is there any way of doing this without changing the formula manually every time?

View 3 Replies View Related

Event Change To Change The Sheet Name Based On A Cell Value

Jul 21, 2009

Im trying to use an event change to change the sheet name based on a cell value, but my issue is how can I error trap if the sheet name is a duplicate? Here is what I have so far

Sub ChangeName()
On Error GoTo errhandler
Sheets(1).Name = Sheets(1).range("d10")
Exit Sub
errhandler:
MsgBox "sheet name is already exists"
End Sub

View 9 Replies View Related

Change To Formula Based On A Range

Apr 26, 2014

=IF(D8=9999,"",IF(D8<>"",0.02,""))

I am currently using this formula and rather than 9999 I want any number from 9000 to 9999 to result in 0

View 1 Replies View Related

Formula To Offset Based On Change

May 24, 2012

I'm looking for a formula that will take the cells used as a heading and place them cell into columns with the corresponding rows under the heading.

I'm thinking that the formula will have an offset that counts the blank cells in column A then place the text from the heading cells (by heading cells I mean the ones that say "Type A" and "Code X") next to the rows with the products.

Maybe a VBA script? What do you think?

View 7 Replies View Related

Subtracting Various Cells From One Constant Cell?

May 15, 2014

Say I have the number 325 in A1. Each time I type a number in A2, B2, C2, D2, E2, A3, B3, etc... I would like the number (325) in A1 to be reduced.

Also, how do I create a pull down list?

View 6 Replies View Related

Array Constant From Cell Values

Aug 26, 2008

I need to convert a cell that has a list of values A1 = 1,2,3. To a range expression {1;2;3}. I want to do this with a formula and not VBA. Example: Cell D1 has the formula = SUMPRODUCT(COUNTIF(C30:C31,A30:A32),B30:B32). I want to put the list range from column C into one cell.

ABCD
110140
2203
3305
450
560

View 4 Replies View Related

Can A Formula Change Based On Data In Other Cells

Feb 25, 2004

What I mean is, I have a formula that sums a specific cell across several tabs.

=sum('120:125'!C15)

Lets say that this formula resides in a summary sheet. And that the summary sheet is definable by a control in another sheet (user friendly).
So in the user friendly sheet, a user toggles to 'Assets'. In the Summary sheet, Assets appears in cell a1, there is a lookup table somewhere, and a lookup value of 120 appears in cell a2.

I want the formula above to adjust for cell a2.
If a2 = 115, then the formula should adjust to

=sum('115:125'!C15)

Of course after I understand how to do this, I can do the same with the end of the sheet range and the cell ref.

View 9 Replies View Related

Change Cell Address In Formula On Cell Value Change

Mar 25, 2013

I have below formula.i need to change the cell address AK in the below formula on the value change in the A3.

=SUMIF(Working!$D$6:$D$3000,Report!B3,Working!$AK$6:$AK$3000)

For example if A3 is having value AZ i need the formula changed automatically as below

=SUMIF(Working!$D$6:$D$3000,Report!B3,Working!$AZ$6:$AZ$3000)

View 4 Replies View Related

Forcing Round Cell To Be Constant Number?

Dec 3, 2013

the way my spreadsheet's set up so far is that each employee should have a goal of, say, 100 for how many people they need to sign up. But they each have specific geographic breakdowns in their turf, some of which might be bigger or smaller than others, but at the end should all add up to 100 for each employee.

It's not super hard to do since I just take a goal of 100, in this example, and multiply it by the percent of population of the area in their overall assignment and give them a goal for that area based on that. So if Philadelphia has 70% of their total population, Upper Darby has 20% of their total population, and Phoenixville has 10% of their total population -- the goals would come out like this:

Philadelphia, Goal: 70
Upper Darby, Goal: 20
Phoenixville, Goal: 10
Ryan, Total Goal: 100

For some of the employees, that works out perfectly -- but based on the population sizes, the rounding sometimes gets a little off and it could end up like this:

Philadelphia, Goal: 71
Upper Darby, Goal: 19
Phoenixville, Goal: 11
Ryan, Total Goal: 101

For most employees, it ends up being dead-on 100 -- but there are some whose totals are at 98 or 99 or 101, and I was wondering if there was a way to force it to shave a point off or add a point on somewhere, pending on how close the decimal was when it rounded to make sure that it always ends up exactly on 100. (I'm using 'Data >> Subtotals' to get what's being represented above as "Ryan, Total Goal.")

View 10 Replies View Related

Use Cell Value As Constant (Const) In Macro Code

Jun 25, 2008

I'm trying to set named range as a constant in VBA, to allow me to recall the same range as an output target in different subs, without having to 'set' it in each module. I have tried to declare it at the top of a module like this...

Public Const tpnb_range = Worksheets(" SQL").Range("tpnbs")

and get a "Compile Error : Constant expression required"

View 3 Replies View Related

Change Column Referenced In Formula Based On Date

Dec 12, 2013

I'm trying to create a list that references an existing data set where I have staff listed month by month and based on today's date, imports only if there is data in that column. I have figured out how to check if the cell is blank or not, but what I want to do now is change the cell that is referenced in the formula based on the date. Here is the format of the spreadsheet I'm working with:

A
B
C
D
E
F
G
H

[code].....

In this case, the "Team 1" and "Team 2" and "Team 3" references what team they are on that month. If it is blank, they aren't with the company any longer. The formula I am using is intended to import this data elsewhere, and is formatted like this:

=IF(ISBLANK(B2), "", A2) - My understanding is that this checks to see if B2 has data, and if it does, it inputs the employee name (A3) in that cell.

My ultimate goal is to be able to change the column referenced after the "isblank" calculation based on the date. So if today is April 2013, I want it to check B2, but if it's December 2013, I want the formula to check J2. Is there a way to do this? I don't mind if it's two steps (like if I have to put the date somewhere in the spreadsheet in order to run the calculation), but ultimately it would be the type of thing I could do that would leverage the existing data set so that I don't have to maintain two different spreadsheets of information.

View 2 Replies View Related

Change Cell Value And Not Change Formula

Jan 27, 2007

I want to edit a cell's value without changing the formula the cell contains.

View 10 Replies View Related

Excel 2007 :: Get Cell To Refer To Date That It Contains And Change Cell Colour Based On That?

Dec 19, 2012

I work for a UK charity and have a list of funders in an Excel 2007 spreadsheet.

One of the columns refers to the date on which a new application for funding can be made to that particular funder.

In many cases new applications for funding can't be made for 1 or more years since the last application - sometimes as many as 5 years later. How to get a cell to refer to the date that it contains.

For example, say I have in cell A1 "The Acme Funding Organisation" and in cell B1 (i.e. the "Reapply when?" column) a date of 01/04/2013 (British date format, i.e. 1 April 2013) then what I want Excel to do is to look at the date in cell B1 and if that date has been reached to highlight the cell red. That way I'll know that the reapply date has been reached & that a new application can be made.

View 2 Replies View Related







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