| Pages: [1] :: one page |
| Author |
Thread Statistics | Show CCP posts - 0 post(s) |

Callente Riveara
|
Posted - 2007.06.07 16:42:00 -
[1]
I want numbers in one column to appear whenever there is another specific number in anothe column...if you understand what im saying.
For example..
A B C D E 1 25 13
2 54
3 75
4 10
5 25 13
Crude example...but it works I suppose. For every number 25 that appears in the A column, I want a number 13 to appear in the D column. What is the correct way to do this? Is it possible to do without a table?
|

Vari
Carbide Industries
|
Posted - 2007.06.07 16:47:00 -
[2]
Edited by: Vari on 07/06/2007 16:46:18
That was easy, type "=if(" and it should give you the parameters to that command.
If it doesn't, here's what 2007 shows me:
IF(logical_test, [value_if_true], [value_if_false])
cheers!
|

Callente Riveara
|
Posted - 2007.06.07 16:56:00 -
[3]
Well the problem is, the If command appears to only allow me to allocate the formula to one CELL.
I need it to work with an entire column, using another column for the numner
|

Joseph 9
Deep Core Mining Inc.
|
Posted - 2007.06.07 17:01:00 -
[4]
I maye be misinterpreting you here but I think all you need to do is copy and paste the if command all the way down the second column.
So if a1:a50 have the numbers in repeat the if command in b1:b50.
|

Vari
Carbide Industries
|
Posted - 2007.06.07 17:03:00 -
[5]
Aye. I kinda don't know what you're asking but ...
Working with your example here ... the formula works if you need the the number 13 to appear based on a cell in the same row. Please tell me you did the ol' drag down the bottom-right corner of a selected formula cell trick.
|

Callente Riveara
|
Posted - 2007.06.07 17:08:00 -
[6]
well i tried
=If(B7,1863,)
B7 is the number 25 in this case, 1863 is the number 13. There should be nothing placed in the cell if the number isnt 25.
I copied and pasted, but it allocated 1863 to the entire column because I put B7 as the Logical...
im stumped now.
|

Vari
Carbide Industries
|
Posted - 2007.06.07 17:12:00 -
[7]
Edited by: Vari on 07/06/2007 17:17:16
Originally by: Callente Riveara well i tried
=If(B7,1863,)
B7 is the number 25 in this case, 1863 is the number 13. There should be nothing placed in the cell if the number isnt 25.
I copied and pasted, but it allocated 1863 to the entire column because I put B7 as the Logical...
im stumped now.
Ah my friend, sorry I assumed you knew a thing or two about programming (or boolean operations). You would want to make it say
=IF(B7=25,1863,)
Yes it does put a 0 when the condition is false. Sorry I don't know how to get around that.
I made a little image of it in action. A column is randomly generated numbers from 1-20. B column makes the cell equal 1 if cell to the immediate right >= 10.
|

Callente Riveara
|
Posted - 2007.06.07 17:18:00 -
[8]
okay thanks.
Now on to the next problem...
I have multiple numbers in the A column, and I need them to correspond to certian numbers, just like in the orginal example (IE, if Column A has a 43, I need column D to say 14 instead of 13)
What do I do here? Sorry if these questions are easy to answer, im not incredibly adept at Excel.
|

Vari
Carbide Industries
|
Posted - 2007.06.07 17:30:00 -
[9]
This is where it can get a little tricky. Look at this image here.
Randomly generated numbers 1-3 in column A. It makes 3=3, 2=4, 1=5. You chain additional condition statements inside the 'false value'. It's easy to miss a parenthesis and break the formula so be careful. If you have a lot of values that need replacing then the formula will get quite long and you'll probably have to see if there's another way.
|

Joseph 9
Deep Core Mining Inc.
|
Posted - 2007.06.07 17:46:00 -
[10]
Can you tell us what your trying to do. I find nested if statements are best avoided if possible. Especially in excel where it all goes into one line.
|

Callente Riveara
|
Posted - 2007.06.07 18:30:00 -
[11]
Vari, that looks good! Thanks!
As for what I am doing..
I am making a spreadsheet of a list of parts we have produced on a certian machine for the last month. The parts show up many times. I am also including the size of the die that cuts the part out, which corresponds to the part#. So i want to do this instead of typing each size out. I suppose I could just filter, and copy and paste, but for the ease of the future of the spreadsheet I figure a formula will be easier for someone else messing with my documents (as im only here for the summer)
|

Vari
Carbide Industries
|
Posted - 2007.06.07 18:39:00 -
[12]
No problem!
And Joseph's right, if you ever get into programming, putting too many statements like that on one line is a BIG no no. I myself freaked out and got the sweats when I wrote that.
|

Callente Riveara
|
Posted - 2007.06.07 18:54:00 -
[13]
is there any way around the long line? or is it just going to have to be that way..
Because the list of parts is pretty hefty...for example my first line I made looks like
=IF(B7=9250,1863,IF(B7=9290,1792,IF(B7=9147,1680,IF(B7=9135,1899,IF(B7=9139,1784,IF(B7=9137,1704,IF(B7=9140,1693,IF(B7=9141,1590,))))))))
Keep in mind, that is 8 of somewhere around 50 or 60ish parts (possibly more)
|

Vari
Carbide Industries
|
Posted - 2007.06.07 19:05:00 -
[14]
Edited by: Vari on 07/06/2007 19:07:13
50-60 parts is exactly what I feared. Don't try to make it all on one line because chances are good you'll miss on little comma or parenthesis and it won't work, and you'll never be able to fix it.
A good place to start would be to read on the dget function. I have no experience with it so sorry I can't help ya out 
|

Callente Riveara
|
Posted - 2007.06.07 19:18:00 -
[15]
Yikes. I think I will try messing with the If for a little longer. 8 parts wasnt so bad.
Thanks for the help though!
|

Joseph 9
Deep Core Mining Inc.
|
Posted - 2007.06.07 19:38:00 -
[16]
Edited by: Joseph 9 on 07/06/2007 19:37:49 Okay, if I read you correctly you have a list of parts comming of the machine in time order that looks something like (using simple numbers for this example)
1, 4, 5, 6, 2, 3, 4, 1, 4
And you want to associate a die size with them such as
10, 40, 50, 60, 20, 30, 40, 10, 40.
The best way to associate these two things is to have a look up table, say on sheet two that reads
1 10 2 20 3 30 4 40 5 50 6 60
and so on. Then use the vlookup command. If you put the data in sheet one and the lookup on sheet two the command will go in sheet 1 B1 and down and will look like the following in B1
VLOOKUP(A1,Sheet2!A1:B9,2)
Without goin into too much detail. The 1st entry (A1) says look at A1 and find the lookup that matches it. Sheet2!A1:B9 says the lookup tablie is on sheet2 between a1 and b9 and the final 2 says match to the second column in that table.
|
| |
|
| Pages: [1] :: one page |
| First page | Previous page | Next page | Last page |