Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I have a column with numerical data in cells ranging from 1 to 500.
I want to replace numbers 1,2,3,4,5,6,7,8,9 with string "1-9".
Meaning
If cell has 1 then replace with "1-9".
If cell has 22 replace with "20-29"
And so on.
What is the formula to do this?
Please help.
Here is a crude way:
=IF(LEN(A1)=1,"1-9",IF(LEN(A1)=2,LEFT(A1,1)&"0-"&LEFT(A1,1)&"9",IF(LEN(A1)=3,LEFT(A1,2)&"0-"&LEFT(A1,2)&"9")))
Examples
1 1-9
22 20-29
488 480-489
Assumes your values are listed in column A.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 7 months ago.
Improve this question
I have something like that on Excel
row
G
H
2
Manual
810
3
Manual
600
I want the Cell to check if any G column says Manual, and for every one it does it will then SUM the H column, if it doesn't, it does nothing, the only way I could do it was as bellow:
=IF(((G2)="Manual");SUM(H2);"")+IF(((G3)="Manual");SUM(H3);"")
If I try something like:
=IF((($G$2:$G$3)="Manual");SUM($H$2:$H$3);"")
It just give me an error stating an array value could not be found
I have other 99 items and I would like to keep it as clean as possible, can anyone assist?
Below all formula should work for you.
=SUMIFS(H:H,G:G,"Manual")
=SUMPRODUCT((H:H)*(G:G="Manual"))
=SUM(FILTER(H:H,G:G="Manual"))
=SUM(IF(G:G="Manual",H:H,0))
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 9 years ago.
Improve this question
I have the following data in a spreadsheet:
I
I need a formula/workaround that would give me the following:
Thanks,
You can reference and repeat data by using the INDEX function.
Placing the formula =INDEX(A:A,FLOOR((ROW()+4)/5,1),1) into a cell on the first row (B1, C1, etc.) and copying down will repeat everything in column A 5 times.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Closed 9 years ago.
Improve this question
A1= 831 , 12673 , 12286 , 5974
=LEFT(A1,FIND(",",A1,1) - 1)) it returns 831 thats OK.
If, =Right(A1,FIND(",",A1,1) - 1)) returns 5974
But how to get middle 2 values like 12673 & 12286 ??
Note- My values do not have fixed length, some of them are 4 digit, some 3 and some 5.
In B1, enter =SPLIT(A1,","). This will split the comma separated value in A1 into 831, 12673, 12286, 5974.
You can play around with the function to include spaces too.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I need to sum the integer values in a column in my excel spreadsheet. I also need to consider 2 to be 1. for example, I have the following column:
./.
./.
1
2
2
./.
./.
./.
0
To get the sum, I need: sum(A1:A11), but how do I count 2 as 1 for the summation?
What about other numbers, does 3 count as 3....or are there only 1s and 2s? if the latter perhaps use COUNTIF like this
=COUNTIF(A2:A10,">=1")
Make a second column with a formula like
=IF(A1=2;1;A1)
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
This question does not appear to be about programming within the scope defined in the help center.
Improve this question
I have an excel that looks like this:
I need a formula that will prompt 'NOK' (or 'OK') when the size is not with the range (Lowest & Highest). The expected output should looks like this:
For O2, your formula would be:
=IF(AND(L2<=M2, L2>=M2),"OK","NOK")
and of course, you can drag it down for all other cells under column O