Assign Cells To Groups (ie IF Statement) ...
Nov 11, 2009
I have been given a spreadsheet with the sales data for each of our salesmen. Each job has its state listed and what I need to do is break down the information by region. The catch is that the regions are not given - just the states. So I need to assign the states to their corresponding regions. To do this, I tried writing an "IF" statement like this:
=IF((B2="AL"),"SOUTHEAST",IF((B2="CA"),"WEST",IF((B2="NJ"),"NORTHEAST",IF((B2="TX"),"SOUTH CENTRAL", ... and so on.
So I was doing this for all 50 states. The problem is that the statement got too long. So how do I write this? There has to be a shorter/easier way.
View 8 Replies
ADVERTISEMENT
Aug 6, 2014
I have a medication start end and admission date.
and i want to assign a number value of 1 to all the records that the medication start date is 2 days after the admission date. How do I do this using the ifs function.
View 3 Replies
View Related
Sep 25, 2013
I have simplified my problem to its basic parts:
Column A Contains Customer Numbers,
Column B Contains a Balance.
Customers can appear more than once, but the data is sorted by customer number.
In column C, I need to put a 1 when the balance reaches 0 or less, but only for the first instance. Everything else should be 0.
here is how i'd want it to look:
customer
Balance
1st
View 9 Replies
View Related
May 17, 2014
Trying to assign this cell's value to the correct sheet tab for the current month.
Trying this:
Code:
=IF(MONTH(A3)=5,'[Wholesales 2014.xlsx]May'!$P$1,0),IF(MONTH(A3)=6,'[Wholesales 2014.xlsx]Jun'!$P$1,0)
A3 is todays date. Wholesales 2014.xlsx]May is a seprate sheet for the month of may and so forth for june.
The problem is the p1 value is empty for the Jun sheet so I get an error: #VALUE! (I assume that is why I am getting the error?)
Using:
Code:
=IF(MONTH(A3)=5,'[Wholesales 2014.xlsx]May'!$P$1,0)
By itself works just fine. I need to set this up for future use, though.
View 3 Replies
View Related
Jan 23, 2013
I am trying to sum groups of cells where the groups contain a variable number of cells (within a column). My sheet has the following columns, C = plot#, G = plant#(within the plot), and F = number of tillers(for each plant). I need to get the total number of tillers per plot. Plots have different number of plants, so for instance cells c11:c16 are plot 3, cells g11:g16 are number 1 thru 6 (plant#), so I need the total number of tillers which would be sum(f11:f16). But each plot has a different number of plants. I've been told I'm not the best at explaining things,
View 2 Replies
View Related
Feb 7, 2012
im working with a number of related cells and am having trouble with entering formulas. at the moment im entering them in manually but im hoping theres a better way.
suppose I have a few groups of data. the first group is A1-C1, second group is D1-F1, etc. the values of these cells have to be output somewhere else. so if A1=dog, B1 = cat, C1=car then AA1 would be dog cat car. AB1 would be the concatenation of the next group.
Now my problem is how do i put a formula into AB1, AC1 etc. I cant drag and drop. If I drag AA1 to AB1, AB1 will be the concatenation of B1-D1 instead of D1-F1.
As an aside one thing I thought of is to just put the output cells further apart. So if the first output was to goto AA1 the next one could be output to AD1. The only reason I didnt do this is this sheet is wide enough anyway I didnt want to make it any wider. I also thought of outputting D1-F1 into AD1 and then copy/pasting those values into AB1 but that wouldnt work as I need these values to be changeable.
View 1 Replies
View Related
Sep 21, 2012
I am trying to divide the total of two groups of cells and I used the following formula:
=sum(B3:M3)/(B17:M17)
However, that is not a correct formula.
View 4 Replies
View Related
May 3, 2007
to set up a rule so say certain numbers can be put into two groups in another cell.
i.e. codes 01,02,03,04 are grouped in country 1 and 05,06,07,08 are from country 2, so in the same row in a seperate cell it would identify if the product was 1 or 2?
View 9 Replies
View Related
Mar 21, 2014
I cant seem to multiply two groups of cells at the same time. Its a hard one to explain so this is what I have tried to use and it doesn't work
=sum(a1:a5*5),(b1:b5*10)
so I tried...
=sum((a1:a5*5)(b1:b5*10)) and that didn't work either
what I want to do is add a1-a5 then * 5 and add it to the total of b1-b5*10.
View 8 Replies
View Related
Oct 8, 2008
I am working on this project for work that is pretty large (about 13500 rows) that is filled with items that I currently have sorted alphebetically. What I need to do is if there is a group of cells that have the same code, I need to insert a row at the very end of that group and autosum the quantity. It is becoming very time consuming doing it all by hand so I am trying to find out: is there a function that will automatically insert a row after each group of codes?
View 2 Replies
View Related
Feb 6, 2014
I am trying to add 2 groups of cells and then divide the number by 60?
I can't get it to divide? It will only total.
=SUM(T807:T832)+SUM(T837:T846)/60
View 2 Replies
View Related
Dec 7, 2012
I have uploaded a sample sheet to illustrate what I am looking to do.
I want to pull out all instances where the four sheets of a 'book' are the same and appear in the same order. (column b is not really important) I have thousands of 'books' in the sheet so doing the task manually is not really an option.
View 2 Replies
View Related
Aug 11, 2008
I am trying to write a formula that will return a result based on which list a cell is found in.
Column A comprises of aisle/position information. The values range from B01 to B65, C01 to C65 ... H01 to H65 (Like aisles/shelf positions in a supermarket). This is not a static list, as the information in column A will change from week to week. It will be sorted prior to trying to work with it. The first three characters of the values in A will be what I'm comparing to the list. There is a fourth character that determines further details about the item that are not pertinent to this issue.
I need to match the value in column A to one of the four groups of values below and have the correct color display in column F. The correct color would be the name of the list that the value is found in.
Blue (K2:K61) contains the values B01 through B25 and C01 through C25.
Red (L2:L80) contains the values F01 to F21, G01 to G23 and H01 to H35.
Yellow (M2:M95) contains the values B36 to B65, C45 to C65 and D23 to D65.
Green (N2:N124) contains the values E36 to E65, F34 to F65, G34 to G65 and H37 to H65.
It probably boils down to a nested IF statement that checks to see if LEFT(A2,3) is found in any of the four lists, but I just can't wrap my head around how to write it.
View 9 Replies
View Related
Jul 24, 2014
I want to count the number of groups of 3 adjacent cells in a horizontal range (C5:EV5) in which any cell in the group of 3 has a value in it (as opposed to all the cells being blank or containing "0"). For example, if any or all of the cells in C5:E5 have a value in it, it would count as 1, and if any of the cells in the group F5:H5 have a value, it would also count as 1, and so on. Is there a way to use COUNTIF for this?
View 5 Replies
View Related
Feb 24, 2010
Is it possible to use the Combobox ListFillRange to list values from two groups of cells? For example, in column 'A', I have the values, 1,2,3; and in Column 'B', I have the values, A, B, C. I want to list the values in column 'A' along with the value of say, B, in Column 'B'.
combobox.listfillrange = "Sheet1!A1:A3" < ---- how to include value B from column B in this list? Or, how to get value A from column B?
View 8 Replies
View Related
Jan 27, 2013
I have a .csv open in Excel 2007 that looks like the following
Code:
1 566
1 566
1 566
2 341
2 341
3 566
3 566
3 566
3 566
...
There is a one-to-one relationship between Column A and B, but B is not unique (but can only take a small set of valid values). I wish to query how many id's (Column A) contain a particular property (Column B). If the example above ended before the "...", I would like to get as the output:
Code:
566 2
341 1
because the property 566 is owned by two id's (1 and 3) and the property 341 is only owned by the id 2.
View 3 Replies
View Related
Oct 24, 2008
Is it possible to assign a name to a range of cells, so that when you insert a formula into another cell you can call that range of cells into the formula?
View 5 Replies
View Related
Oct 17, 2013
I have a 58,000+ line spreadsheet.. I have blank cells, that need to have a value.
The formula I want to write is...
If the cell before the blank cell has a value, carry that value over to the blank cell as well.
so if A1= 2 and A2=(blank), then A2=2 as well.
I also have instances where A2 and A3 are blank and need to be the same values (ie. 2).
View 1 Replies
View Related
May 30, 2014
If I have 5 names like apple, boy, cat, dog, energy
and if i enter a in a cell it should output apple in the same cell.
example: (=IF(A1="a",A1=apple,0))
How to do this?
View 6 Replies
View Related
Jan 15, 2010
I have a VBA form that I would like to assign to a cell, but it's a merged cell. When I do this, the form does not run. If I assign it to a single cell, it runs fine. Is there a trick to tell the macro that the target address is a merged cell?
View 2 Replies
View Related
Jul 29, 2014
I have a table with 2 columns A & B and desired outcome in column C (see attached sample).
I need to assign the same value to cells (in column A) located within the same group (in column A) using the following rules:
If any cell value within the same group = W220 or W210 or E240 or E250, then assign value "Group A"
If any cell value within the same group = P210 or C100, then assign value "Group B"
If any cell value within the same group = N230 or N250, then assign value "Group C"
View 3 Replies
View Related
Jun 11, 2009
I use my spreadsheet to keep score during tournaments. when i calculate my leaderboard at the end of the event i list the results first place all the way down until it finishes the list of players. i need to be able find players with the same or equal score and list them as tied for the same place.
another words if i get to the 3rd place and i had 3 players tie for third i need my leaderboard to show them all in 3rd place . currently it would number then 345. i listed below how it should format it. i also attached a file it will make it more clear.
View 2 Replies
View Related
Feb 27, 2009
1. Start Date (Col. C) - assign date to respective position based on first cell that contains value greater than 0 or "". eg. at first cell with 1 in it, looks up to row 4 and assigns date include in that cell in same column.
2. End Date (Col. D) - assigns date based on last cell with value greater than 0 or ""....
View 9 Replies
View Related
Jun 27, 2014
I am looking for a way to highlight groups of identical number cells in alternating grey and white. My goal is to make it clear when there is a repeating set of numbers. Below is an example of what a completed state of this would look like that I created manually. The real form I will be using this code on will have long number which is why I am looking for this added clarification. I am using excel 2010.
1
1
2
3
4
[code].....
View 4 Replies
View Related
May 15, 2008
I have had some help with this (thanks!) but am stuck.
Can someone add to the code below and make it so that multiple tasks, with multiple assignees, can be created from a range of cells, such as:
Column A Column B
Row 1Task SubjectAssign to
Row 2GV LP for AZJohn Brown
Row 3GV LP for COJohn Brown
Row 4GV LP for ILSuzy Smith
Row 5GV LP for INSuzy Smith
Row 6GV LP for KYSuzy Smith
Row 7GV LP for MNSuzy Smith
Row 8GV LP for MSBob Barker
Row 9GV LP for NCBob Barker
Row 10GV LP for NJBob Barker
Row 11GV LP for NMBob Barker
Row 12GV LP for NVBob Barker
Row 13GV LP for NYBob Barker
Row 14GV LP for OHBob Barker
Row 15GV LP for SCBob Barker
Row 16GV LP for WVBob Barker
(Sorry, it didn't translate well. The "GV LP for AZ" is cell A2, "John Brown" is cell B2.)
Here is the code I have so far:
View 14 Replies
View Related
Feb 23, 2010
I am a research student trying to calculate the linearity of a certain number of individuals (the subjects of my study).
In my matrix of individuals I have the row individuals dominant to column individuals given values of 1, and where individuals in the column are dominant to those in the row, a value of 0 is given. Where the relationships are "tied" a value of 0.5 is entered. I have more than 30 unknown relationships, which I have filled with "x".
What I have to do, is select these x-cells (Haha, Excels :P) and randomly insert a 1-0 or 0-1 dyad between the corresponding individuals. So if (in the data file) Garth and Nala are to have a 1-0 or 0-1 inserted to their corresponding cells, but they must be opposite; like if row-Garth gets a 1 on column-Nala, then column-Garth gets a 0 on row-Nala.
I have highlighted (in the second matrix) all of the non-x cells. I have to make 10,000 matrices (or at least replicate the application of these random 1-0/0-1 dyads 10,000 times).
View 3 Replies
View Related
Feb 27, 2013
So I have this list (I made it a little bit shorter).
So what you see is two different tasks (01 and 02) and three different conditions (A, B and C). In column B you see the result I would like to have. '/Searchtask_01.html' in A1 belongs to conditions A, because it is in session A. However, '/Searchtask_01.html' in A10 belongs to conditions B, because it is in session B.
How to get the results in B with a formula?
View 1 Replies
View Related
Jun 23, 2009
How do I count the number of cells that have a value greater than 0 in a range of cells?
View 2 Replies
View Related
Apr 22, 2009
I am trying to have a cell in sheet "Summary" count the number of cells in column DX of sheet "Analyses" that are greater than 0, provided that the value in column A of "Analyses" corresponds with the value in B8 of sheet "Summary."
(In "Analyses," there are 106 subjects, each taking up 64 rows. So, columns 1-64 correspond to Subject 1, columns 65-128 correspond to subject 2, etc. In column DX, each subject has 64 values that are either 0 or greater than 0. In "Summary," each subject has one row that summarizes the 64 trials. I want a single cell in the "Summary," sheet to reflect the number of times each subject produces a value greater than 0 in column DX of "Analyses.") I tried using this formula, but it did not work correctly:
=COUNTIF(IF(Analyses!$A$1:$A$10000=Summary!B8,Analyses!$DX$1:$DX$10000,""),">0")
(Summary!B8 = 1, so I am trying to calculate the number of values in DX that are greater than 0 only for subject 1.) When I press enter, this yields a value of 384. This is impossible, given that subject 1 only has 64 possibilities of yielding a value greater than 0. Subject 1 has 2 values in column DX that are greater than 0. I tried making this an array formula by pressing Shift+Ctrl+Enter, and that just gives me a #VALUE! error.
View 5 Replies
View Related
Sep 23, 2008
I am trying to put an "If statement formula" within cells using VBA but it errors at the word "error".
Basically what I am trying to do is put similar to the following example into a range of cells.. for example:
=IF(LEN(Verbatim_LU!B2)>100,"ERROR","OK")
...with B2 being worked out by the for..with and the value (in this instance 100) being put in by VerbLen.
NB: Column A contains a reference number hence not having this actioned on it and counts start from 2
View 14 Replies
View Related