Applying Function To Certain Cells Only Based On Another Column

Aug 17, 2014

Supposing you would like to find the median of numbers in column D, but only for rows that have the word "Jones" in column A? Is there a way to do this? Obviously I know I could do a sort and simply specify the range myself, but we're dealing with nearly 2000 rows and a LOT of different values in column A

It occurs to me that it would be even better if I could ask excel, in effect, to identify every separate text string in column a and then find the median of the corresponding numbers in column D. In other words I wouldn't have to type any strings from column A at all.

Applying Formulas To An Entire Column Of Cells

Mar 20, 2007

how do I apply a formula I entered into one cell to all the cells in that column, without going through the tedious process of typing the formula in again in each cell ? I've done it before but don't remember how.

Applying A Mid Function To Many Rows

Jun 14, 2007

I need to cut off addresses by 30 characters. I am doing this using the MID function. However, being a newb, how can I apply this function to say D4, D5 all the way to D899, without copy and pasting for 800 times? I did search this first, and couldn't find a resolution.

Use Sumifs Function Applying 2 Criteria?

Aug 21, 2013

Excel.xlsx

Attached is the example of the data, I am trying to sum the amount applying 2 criteria, within a particular month and other category. The formula tried is

=SUMIFS(D5:D10,C5:C10,"*June",E5:E10,H1)

However it is giving a value of zero only. I have tried other combinations as well.

Applying Function Arguments As A Control/class Name

Mar 16, 2007

I'm not sure what verbage to use in order to describe what I'm trying to accomplish.

Let me give you a piece of code and the question will be clear.

End Function

I would like to use this function later in the code in the form of:

VBA will error out with "Run-time error '424': Object required". I know I need to declare the variable arg1 as a type in order to use it in this form, but I don't know the correct data type.

I also ran across a similar issue like this where the advice was to use the Set function in the form of:

Set arg1 = arg1.AddItem("one")
Set arg1 = arg1.AddItem("two")
Set arg1 = arg1.AddItem("three")
End Function

Extracting Consecutive Letters From Cell And Applying IF Function

Mar 8, 2013

I'm working on an email database and am looking to sort them into type. I am trying (without success) to use the IF function as follows.

If A1 contains the letters "isd" consecutively, then B1=TRUE

If A1 contains the letters "google", "yahoo", "hotmail", or "austin.rr" consecutively, then B2=true

How To Use COUNTIFS Function Only For Visible Data After Applying Filter

May 27, 2014

How to use COUNTIFS Function only for the visible Data after applying filter.

Ex:=COUNTIFS(A:A,"Ret",P:P,"M")-COUNTIFS(A:A,"Ret",P:P,"M",B:B,"") it gives d result including hidden data, but i want it only for visible data after applying filter.

Automatically Applying Custom Value / Number In One Column Dependent On Another Column

Apr 8, 2014

I work in a factory where we create different types of units daily. Below is a list of planned production on a specific date, say today's date. This is a very crude example, with information missing, and it is important to know that there are conditions attached such as:

The types are added randomly. The amount of types is much greater meaning that each type is on it's own page with breaks between. Everything produced on this date will have a URN (unique reference number) with its first 6 digits equating to yy-mm-dd and the last two being the position of the unit in the production sequence (first=01, second=02 etc).

I have gotten it to the point where if you enter them in sequence (Type A first for example) it will lookup to see the last assigned URN and taking the quantity into account issue the correct URNs.

The issues I have are when the URNs are less than "10", there is a problem displaying the 0 before the digit which disrupts the sequence. I can provide more clear examples if required.

Type A
Date08/04/2014
QtyURN
101314040801-03
203514040804-08
462114040809

123914040810-19
Total18

Type B
Date08/04/2014
QtyURN
245114040820

290114040821
689114040822

Total3

Type C
Date08/04/2014
QtyURN
1111414040823-36

211214040821-22
675514040823-27

Total21

Applying A Percentage To A Long Column

Jan 9, 2009

I have a long column of numbers that I want to apply a single percentage to all the numbers in each column. How do I do that?

Applying IF To Multiple Cells

Jan 9, 2014

I am trying to update a project tracking sheet at work and I am having trouble. I have a list of construction projects (approx 130) along with details on the project, one detail being % completed. I am trying to create a summary of the projects at the bottom of the page, showing the total value of all projects, according to the % completed.

<10% is ANTICIPATED
= 10% is AWARDED
>10% <90% is IN PROGRESS
>90% is COMPLETED

[code]....

VBA: Applying The If Statement To All Cells

Mar 3, 2008

I use the If - Then statement in VBA to determine a condition which works perfectly fine for the particular cell I reference to, but i need it to apply to all the cells i.e. cells A1:A10?

Sub MACRO1()

If Range("A1") = "PAYE" Then
Range("B1").Formula = "=C2 * .128"
End If

If Range("A1") = "LTD" Then
Range("B1").Formula = "=(C2 - 100)* .128"
End If

End Sub
Sam

Applying Formula In A Column For New Rows Inserted?

Jul 23, 2014

I've applied a basic multiplication formula =D12*E12 in a table Column F, also I've filled it throughout but now if new rows are inserted in between or at the end of the table, new cells in this columns doesn't include this formula.

Applying Formula To Many Cells That Already Contain Values

Jun 8, 2014

I want to apply a simple formula to a number of cells in an existing workbook that already contain values E.g.

My column contains the values
5200
1600
4376
in separate cells

I want to divide each value by 1.2 - without having to change every individual cell - can it be done?

Excel - Applying Color To Cells?

Sep 19, 2013

I am using two separate workbooks. I am tranferring dates into a new spreadsheet to track projects dates for milestones.

The formula I am using is this: =IF('[BBBBB Dates as of 9-9-13.xlsx]Sheet1'!\$CQ\$4="", VLOOKUP(W54, '[BBBBB Dates as of 9-9-13.xlsx]Sheet1'!\$1:\$1048576, 94, FALSE), VLOOKUP(W54, '[BBBBB Dates as of 9-9-13.xlsx]Sheet1'!\$1:\$1048576, 95, FALSE)).

I would like the cell to turn green if the last part of the formula is true and stay clear if the first part of the formula is true.

I also need to add color beyond just that. I was attempting to apply conditional formatting but am a bit stumped. I want the green to be maintained regardless of other formatting. I would also like to apply to cells that are not color coded green:

Red - if the date is overdue
Yellow - if the date is within 7 days
Otherwise, leave the cell color as clear

Is this possible with conditional formatting? I am not at all proficient in VBA...

Applying Filter To 'Coloured' Cells

Dec 28, 2007

Is it possible to apply Filter utility on Column Cells that are 'coloured'?

Applying Trim To Cells With Hyperlinks

Dec 17, 2008

I have thousands of path names in a spreadsheet that were converted to hyperlinks, but my client wants to see only the filename in the hyperlink, not the whole path.

I created the hyperlinks by applying the following to the column containing the file paths: ....

Applying Formula To Entire Column Without Lengthening Spreadsheet?

Jul 29, 2014

I'm wondering if it's possible to have a formula applied to an entire column without adding unnecessary length to the spreadsheet until someone is actually scrolling down and using more rows. I want formulas to be constantly present in two columns to automatically calculate values as they are entered into other cells in the same row, but ideally without the otherwise empty spreadsheet being X amount of rows long.

I initially had the formula dragged down 15,000 rows, but it would really be much better if it could start out as a smaller size and then expand as the user requires.

Applying Conditional Formatting To Multiple Cells?

Apr 25, 2012

If you have a range of cells with values in them (Q2:AZ2), you can use conditional formatting to identify the top x% of the group and it would essentially treat each cell in comparison to the group. I need to identify if a cell in the group is greater than 3*Stdev(Q2:AZ2). Do I have to create conditional formatting for each individual cell or is there a way to apply a function to the group that would recognize each cell the same way that the canned conditional formatting rules work?

Applying Macro Code To A Range Of Cells

Dec 26, 2009

how can i do the following using VBA
making each cell in column A added to each cell in column B and the result will be in the column C
for example
c1=A1+B1
c2=A2+B2
c3=A3+B3
... etc

i know i can do that simply without vba code but I just want to use this method to implement more complex formulas .

Function To Sum A Column's Entries Based On Another Column

Feb 20, 2009

Let's say I have a dataset with blank or X in column A, and a dollar value in column B. I want to sum the dollar amounts for column B only if there is a corresponding X in that row in column A. The way I currently do that is by creating a new column C, making a if statement to display the value of B only if there is an entry in A, and then doing operations on that new range. I figure there has to be an easier way. I don't know how to use VLOOKUP, despite trying to read the helpme a bunch of times. Is that relevant?

Cannot Select And Pull Down Cells To Copy After Applying A Macro

Apr 23, 2014

I was messing around with some Macros, as an issue came up where clients were pasting over Data Validated cells (thus removing the validation). Somehow though, the feature where you can select a cell, then pull the active cell down through the column (and then can copy, fill series, etc)has become disabled. I deleted all the macros, and turned them off in the Trust Center, but when I click on a cell the box and plus sign still won't display for me to pull the cell down the column.

Automation - Applying Conditional Formatting To Group Of Cells In Loop?

Jul 18, 2014

So I would like to automate the following, as doing it by hand takes a lot of time. I have searched the whole internet and finished empty handed.

Start from cell E10
Select cell
Move 3 cells down
Select cell
Move 3 cells down
Select cell
Move 3 cells down
Select cell
Move 3 cells down
Select cell
Move 3 cells down
Select cell
Move 3 cells down
Select cell
Apply double entry conditional formatting
Move 3 cells down
Repeat above until cell E5000

Applying Formula To Highlight Cells That Don't Follow Standard Format

Feb 4, 2014

I'm trying to find ways of applying a formula in condition formatting to find entries which don't follow a certain format.

to be clear, this is for a reg plate of a car. There are two styles of formats. The X's represent A-Z and # represents numerical values

1. XX##XXX
2. XX####

find a way of applying two test cases (non-simultaneously) so that cells highlight if they don't follow either of the above conditions?

If Function To Return No. Based On 2 Cells?

Oct 14, 2008

I need help on using the If function. Basically I am trying to calculate the cost of shipments. For example, cost of sending 1 box is 150 (eg cell A3), 2 boxes is 280 (cell A4), 3 boxes is 400 (A5), 4 boxes is 500, etc upto to 10 boxes (cell A12).

What I am looking for is cell A1 to provide me the cost based on the manually entered value of cell A2, i.e. if I enter a number between 1 to 10 in cell A2, then A1 should return a number from A3 to A12, e.g. enter 3 in A2 then A1 should return 400.

Is there such a formula or do I have to enter manually the amounts into an If function?

Lookup Function Based On Multiple Cells

Jul 21, 2005

in the lookup function listed below, it only produces a result for the first exact macth. well, what if the data i am searching on could result in multiple results?
i would like advise on how to modify this formula to bring back the 2nd, 3rd, 4th, etc instance of a match in the lookup array.

the original formula , i found on this site, allows you to combine multiple cells to create a unique reference, and then search in another table containing columns of those combined cells, and results in the intersection of a row and column and that is the data you want returned ....
kind of like a hlookup, but you can use one or more cells to create the unique lookup, and bring back whatever column you want (where as a hlookup is limited to searching the left most column and bring back a column to the left)

here is the formula:

{=INDEX(data to retrieve,MATCH(cell1&cell2,table to find cell1 in&table to find cell2 in,0))}

"data to retrieve" is an array of one column containing the data you want to retrieve
"cell1&cell2" is a combination of cells to make the unique lookup (this could just be one cell if you wanted)
"table to find cell1 in&table to find cell2 in" is a table array to look in to find the look up value

F2 Function For Multiple Cells In A Column?

Jun 19, 2014

I have a source sheet with numbers in column A, D and M. These are strictly numerical and show to be Number. I used Vlookup in another sheet to input these numbers. The column with the Vlookup is also formatted as Number. I then copied the Vlookup results and pasted as Values. Then I used Mode to find the most common number. In most cases it works, however, some cells are coming up #N/A. In the columns that were pasted as values, if I press the F2 key, then enter, the Mode formula then works.

MATCH Function In A Column Of Cells

Mar 22, 2008

I have a formula that uses the MATCH function in a column of cells. My "lookup array" value for this MATCH function is A11:A411. I paste my data set into column A and if my data set is smaller than 200 (i.e. less than half the size of the lookup array size) then THE MATCH FUNCTION DOESN'T WORK. Weird.

1. Is there a way to make MATCH work all the time, no matter what the size of my data set?

2. One solution would be to have my "lookup array" be variable. Is there a way that I could change A11:A411 to A11:A"row of last value in data set"? OR to say it another way, is there syntax to describe a range with variables as the row numbers?

Sum Cells Based On Other Cells Value Using Right Function?

Jun 23, 2013

I have a tabel where in column A i have names, some of the names end with a certain text "text".
In column B I have values.

I'd like to sum all the values where corresponding names contain "text" at the end.

How to do it using 'right' function?

Calculate The Average Of A Group Cells In One Column Based On The Condition Of Another Column

Oct 2, 2008

I'm trying to figure out if there is a formula I could use that will calculate the average of a group cells in one column based on the condition of another column. It's hard to explain, so I will show an example. All the data is on a one worksheet and I'm trying to show totals and averages on another worksheet. Location, Days

17, 4
17, 3
17, 5
26, 4
26, 8
26, 10
26, 7

On a different worksheet I would want to know what the average days are for each location. So is there a formula that I could use that will look at column A for a specified location number and then average all the days in column B for that location? I'm using Excel 2003 and have tried using the Average(if) but with no success.

Count Of Cells In Column Based On Criteria On That Line In Different Column?

Mar 10, 2014

I have two columns. Column A had numbers and column B has names. I need a count from column A for each name in column B.