Reply
Wed 30 Apr, 2003 03:46 pm
I have a table that contains a row with many numbers. I want to look at each individual cell in that column and compare its value to a range of values. If the value in the cell matches the range, I want to add a percentage to the number and store the result in another cell of another column. If the value in the cell does not match the range, I don't want to do anything.
=if(individual cell)=sum(range),%(individual cell)," ")
Heck, I don't know either. Fool around with the above formula. You may have to add a few parenthis or something, but otherwise, I think the syntax is okay. The final " " is what it looks like. Quotation marks around a blank space, which will return nothing but a blank space. You could also put text inside the quotation marks.
I haven't tested the formula, by the way.
Missed understood
Roger,
Thanks for your response, but I think I did not explain myself well enough, so let me give it another try.
I want to look at the individual values of cells in a range of cells in a column and compare them to a range of values. If the value(s) meet the criteria then I want to take away a percentage from the value and store the result in a new cell in a new column, on the same row.
In other words: IF B4:B10>=20 AND B4:B10<=30 THEN C4:C10=B4:B10-(B4:B10*6%)
This formula is nowhere near useable, or correct, however, I thought it could help better explain what I want to do.
Thanks again.
Honest.....I could answer this question if I could see stuff on paper! :wink:
In other words: IF B4:B10>=20 AND B4:B10<=30 THEN C4:C10=B4:B10-(B4:B10*6%)
Oh. Have you tried using my syntax, then? Like. . .
=if(B4:B10>=20 AND B4:B10<=30, ((C4:C10=B4:B10-(B4:B10*.06), " "))
Still groping here, but that's another 'somethin' to fool around with'. Notice that this is the classic IF, Then, Else statement, and you have to use all three elements, hence the inclusion once more of the " ". In the formula, the IF is IF, of course. the first comma stands for the THEN, and the final comma represents the ELSE.
Were I not so lazy, I would set this formula up on a spread sheet and let Excel tell me if the parinthesis were balanced. I suspect one more pair are needed, but again, it's been a while since I monkeyed with this type of formula, and it has always been a bit of 'grope and hope', while checking answers against a known calculation.
Ah, yes, but this is Excel with its own syntax.
If A = TRUE then (do this) else (do that) in Excel becomes
IF( A, (do this), (do that) )
'and' works much the same.
Ask the talking paperclip.