I have column A and B, i want to concatenate A with B values into c column using formula but need help. The problem is, if column B has more than two colors, then the formula breaks. I'm not quit sure how to fix the formula to support more than 2 colors which will likely happen on my worksheet. Here's the formula:
=IF(AND(A1="---",B1="---"),"---",IF(A1="",CONCATENATE(OFFSET(A1,-1,0)," - ",B1),CONCATENATE(A1," - ",B1)))
Try:
C1: =CONCATENATE(MAX($A$1:A1),"-",B1)
and fill down.
To account for the "---" entries:
C1: =IF(AND(A1="---",B1="---"),"---",CONCATENATE(MAX($A$1:A1),"-",B1))
Edit: Oh, and if the labels in Column A might not be in a nice numerical sequence, or might be text, you can use:
C1: =IF(AND(A1="---",B1="---"),"---",CONCATENATE(LOOKUP(2,1/(LEN($A$1:A1)>0),$A$1:A1),"-",B1))
Try this:
=INDEX(A:A,MATCH(1E+99,$A$1:A1))&"-"&B1
Related
I want to make an excel formula so that, I can test out 3 columns and if they are true then to set a new value to the 4rth column.
I have this formula:
=IF(AND(A1="ALFA ROMEO"; B1="159"; C1="55");D1="2016";D1="")
and I want to check if A1 and B1 and C1 are true then to set D1 equal to a certain value.
*I've tried many complex ways to achieve it but this formula is the only one that doesnt pop up an error, but still gives back the Value FALSE(Not in D1, but in the cell I tried it). I've also tried seperating with commas etc...
Any possible help or way I could achieve the check?
It should come from the quote ("") around the number
I've try this
=SI(ET(A1="ALFA ROMEO";B1=159;C1=55);2016;"")
and it worked for me (sorry it's in french).
Maybe try to change cell format from the column B and C.
And also put the formula in cell D1 or in the cell you want the value.
You're almost there, but you need to put this formula here in cell D1 in order to fill the value of D1:
=IF(AND(A1="ALFA ROMEO", B1=159, C1=55),2016,"")
Keep out: in my locale I'm working with commas, while you might be working with semicolons, so your actual formula might be (in cell D1):
=IF(AND(A1="ALFA ROMEO"; B1=159; C1=55);2016;"")
Also, no need to put numerical values (159, 55) as strings, as you can see.
Edit: about turning B1 into a string:
I've just created this formula:
=IF(TEXT(B1,"0")="159","TRUE","FALSE")
This allows you to convert B1 into text.
So, your formula might turn into something like:
=IF(AND(A1="ALFA ROMEO", TEXT(B1, "0")="159", TEXT(C1,"0")="55"),2016,"")
(Again, mind the locale settings (commas and semicolons))
I have data in column A and B have lookup data.
For A2 (FY|F|V|D|Safety|3M). take the B column first value and search whether there is any match if not take second value in B column and repeat the process for all the B column values and if there is match print the B column value in Result. Does that make sense?
I tried with VLOOKUP but no luck. Please help me.
Columns:
A B(Lookup) C(Result)
FY|F|V|D|Safety|3M Toro 3M
FY|F|V|D|POP|ToroDays 3M Toro
FY|F|V|D|Lumber|GroundContact honeywell NA(Not available)
FY|F|V|D|airfilters|honeywell samsung honeywell
Enter the following formula in Cell C2
=IFERROR(INDEX($B$2:$B$5,MATCH(TRUE,IF(FIND($B$2:$B$5,A2)>0,TRUE),0)),"NA")
This is an array formula so commit it by pressing Ctrl+Shift+Enter. Drag/Copy down as required. Change range as needed.
See image for reference.
NOTE : Above formula is case-sensitive. If you want non-case-sensitive result you can use following formula.
=IFERROR(INDEX($B$2:$B$5,MATCH(TRUE,IF(FIND(UPPER($B$2:$B$5),UPPER(A2))>0,TRUE),0)),"NA")
In C2, put this and drag down:
=IF(ISERR(SEARCH($B2,$A2)),"N/A",$B2)
Here you go. A Google docs spreadsheet you can see.. The screenshots are from it.
Formulas
Results
You could have string with Toro3M in it, or all 4 for that matter.
The solution I have solves that. But you'd need to tweak to add commas or some such seperator.. And conditionally do it if cell in column F-I are zero length.
I have 2 columns in my spreadsheet, both contains some numbers, column A has list of all numbers, and column B has some of the numbers from column A, now i want to highlight those numbers in column A, which are in column B here's my scenario:
Column A Column B
20301316 20322063
20302140 20322451
20307329 20326125
20307557 20334858
20314386 20371898
20314840 30368489
20322451 30384472
20326125 30384510
20334858 30384531
20371898 30384661
Here
20322451
20326125
20334858
20371898
should get highlighted. i used vlookup for this but for some reason it's highlighting all the numbers, here's the formula i used inside Conditional Formatting: (considering column A has values between A1:A10 and B has B1:B10)
=NOT(ISNA(VLOOKUP(B1, A1:B10, 1, 0)))
Could anyone please help me with proper formula.
Vlookup returns a value. In this context it is not the best formula to use, especially if you use it to return the value that you are looking up.
MATCH() is a much better fit for this scenario.
=MATCH(A1,$B$1:$B$10,0)
No fuffing around with ISNA() or wrapping in NOT() required. If it's a match it returns a number and will get formatted. If it's not a match, it won't get formatted.
It looks like you got the formula a bit backwards as it's looking in column A for values from column B. Try this instead:
=NOT(ISNA(VLOOKUP(A1,$B$1:$B$10,1,FALSE)))
Also, note that I made the lookup range an absolute reference by adding dollar signs.
Really though, I'd prefer a COUNTIF formula for this, just because I think it's more obvious:
=COUNTIF($B$1:$B$10,A1)>0
I have a spreadsheet that has columns for dates and the values can be either "1v, .5v, 1p, .5p, 1s, .5s"
I have 3 columns in each row one for each letter "v, p and s". I want to be able to add the total of all cells in the range grouped by letter and then display the sum for each letter in it's respective column (v, p or c).
Here is an example of the sheet:
Name Vacation Personal Sick 1/5/15 1/6/15 1/7/15 1/8/15
Billy 1.5 1 0 .5v 1v 1p
It is the formula that goes in the vacation/personal/sick cell that I just can't figure out.
I went down the array formula route and came up with essentially the same formula as #Sancho.s :-
=SUM(LEFT($E2:$H2,LEN($E2:$H2)-1)*(RIGHT($E2:$H2)="v"))
You could modify it to take account of blanks:-
=SUM(IF($E2:$H2<>"",LEFT($E2:$H2,LEN($E2:$H2)-1)*(RIGHT($E2:$H2)="v")))
Perhaps this would be better, to ignore any mis-formatted cells:-
=SUM(IFERROR(LEFT($E2:$H2,LEN($E2:$H2)-1)*(RIGHT($E2:$H2)="v"),0))
These all have to be put in with Ctrl-Shift-Enter.
Assuming the range you posted starts at A1, use
=SUMPRODUCT((RIGHT($E2:$G2,1)="v")*LEFT($E2:$G2,LEN($E2:$G2)-1))
in B2. Change "v" and the range to use suitably.
Pro:
It is not an array formula. See why this may be important
Con:
I could not make it work with blank cells.
This "array entered" version will also allow blanks
=SUM(IF(RIGHT(E2:G2)="v",SUBSTITUTE(E2:G2,"v","")+0))
confirmed with CTRL+SHIFT+ENTER
I have a list with more than 700 entries (see the picture below).
In row 'B' there are some numbers that have suffix "KM", "KN" or "E".
Is there some formula(or any solution) that can add these numbers but in the same time to separate these 3 suffixes(not to add them together, but to separate "KM", "KN" and "E"), so the solution can be something like:
1. 345 KM
2. 220 KN
3. 560 E
The below formulae should be able to split the numbers and the suffixes found in column B:
=LEFT(B1, 0, FIND(" ", B1))
=LEFT(B1, FIND(" ", B1)+1, 9999)
If you wanted to avoid VBA, you could use DSUM. I've never actually used it, but I know it can be useful for this type of thing. Hopefully that points you in the right direction!
Use Data \ Text to Columns to split your column based on the space character, then pivot your data and use the Unit (KM, KN, E) as a row field and the number as a data field.
With data in B1 , in C1 enter:
=--MID(B1,1,FIND(" ",B1)-1)
and copy down. In D1 enter:
=MID(B1,FIND(" ",B1)+1,999)
and copy down
Finally to get the sums, use formulas like:
=SUMPRODUCT((C:C)*(D:D="KM"))
It sounds like you want to add each type of suffix together.
Simplest way is to separate the numbers into its own column.
You can enter =NUMBERVALUE(LEFT(B1,SEARCH(" ",B1))) in cell C1 and copy down for each row to accomplish this. Then use a SUMIF function to get the results.
KM: =SUMIF(B1:B999,"=*KM",C1:C999)
KN: =SUMIF(B1:B999,"=*KN",C1:C999)
E: =SUMIF(B1:B999,"=*E",C1:C999)