Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Specific formula query

Excel 2003

I want a cell to show a different value depending on whether another cell
shows less than, equal to, or more than a range of values. For example:

If value in cell X is 16 or less, I want cell Y to show 1
If value in cell X is more than 16, but less than or equal to 32, I want
cell Y to show 2
If value in cell X is more than 32, but less than or equal to 48, I want
cell Y to show 3
And so on...
Help please, can't seem to create the right syntax to make this happen...
Thanks
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Specific formula query

Here's one way of doing it:

=INT(CEILING(X,16)/16)

Put the formula in your Y cell, changing X to an appropriate cell
reference.

Hope this helps.

Pete


On Dec 5, 7:15 pm, TomL77 wrote:
Excel 2003

I want a cell to show a different value depending on whether another cell
shows less than, equal to, or more than a range of values. For example:

If value in cell X is 16 or less, I want cell Y to show 1
If value in cell X is more than 16, but less than or equal to 32, I want
cell Y to show 2
If value in cell X is more than 32, but less than or equal to 48, I want
cell Y to show 3
And so on...
Help please, can't seem to create the right syntax to make this happen...
Thanks


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Specific formula query

=ROUNDUP(A1/16,0)
--
Gary''s Student - gsnu200760
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Specific formula query

Cheers Pete, that's a start but I should have been more specific:

If value in cell X is 16 or less, I want cell Y to show value "1" AND if
value in cell X is more than 16, but less than or equal to 32, I want cell Y
to show value "2"
AND if value in cell X is more than 32, but less than or equal to 48, I want
cell Y to show value "3", and so on...

(Cell X being the same cell on the same spreadsheet all the way through)

Does this clarify?

"Pete_UK" wrote:

Here's one way of doing it:

=INT(CEILING(X,16)/16)

Put the formula in your Y cell, changing X to an appropriate cell
reference.

Hope this helps.

Pete


On Dec 5, 7:15 pm, TomL77 wrote:
Excel 2003

I want a cell to show a different value depending on whether another cell
shows less than, equal to, or more than a range of values. For example:

If value in cell X is 16 or less, I want cell Y to show 1
If value in cell X is more than 16, but less than or equal to 32, I want
cell Y to show 2
If value in cell X is more than 32, but less than or equal to 48, I want
cell Y to show 3
And so on...
Help please, can't seem to create the right syntax to make this happen...
Thanks



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 303
Default Specific formula query

One way

=CEILING(A1/16,1)

or if you want to get more complicated have a look at creating a table and
use the vlookup function.
--
Greetings from New Zealand
Bill Kuunders

"TomL77" wrote in message
...
Excel 2003

I want a cell to show a different value depending on whether another cell
shows less than, equal to, or more than a range of values. For example:

If value in cell X is 16 or less, I want cell Y to show 1
If value in cell X is more than 16, but less than or equal to 32, I want
cell Y to show 2
If value in cell X is more than 32, but less than or equal to 48, I want
cell Y to show 3
And so on...
Help please, can't seem to create the right syntax to make this happen...
Thanks





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Specific formula query

Yes, well put different values in X and see what you get out of the
formula!

I don't understand how you can have the

...."value in cell X is 16 or less ... AND if value in cell X is more
than 16 ..."

at the same time. Are you refering to a range of cells, eg from A1 to
A10, and so you could have different values in some of those cells?

What is the cell reference of cell X and cell Y ?

Pete


On Dec 5, 7:36 pm, TomL77 wrote:
Cheers Pete, that's a start but I should have been more specific:

If value in cell X is 16 or less, I want cell Y to show value "1" AND if
value in cell X is more than 16, but less than or equal to 32, I want cell Y
to show value "2"
AND if value in cell X is more than 32, but less than or equal to 48, I want
cell Y to show value "3", and so on...

(Cell X being the same cell on the same spreadsheet all the way through)

Does this clarify?



"Pete_UK" wrote:
Here's one way of doing it:


=INT(CEILING(X,16)/16)


Put the formula in your Y cell, changing X to an appropriate cell
reference.


Hope this helps.


Pete


On Dec 5, 7:15 pm, TomL77 wrote:
Excel 2003


I want a cell to show a different value depending on whether another cell
shows less than, equal to, or more than a range of values. For example:


If value in cell X is 16 or less, I want cell Y to show 1
If value in cell X is more than 16, but less than or equal to 32, I want
cell Y to show 2
If value in cell X is more than 32, but less than or equal to 48, I want
cell Y to show 3
And so on...
Help please, can't seem to create the right syntax to make this happen...
Thanks- Hide quoted text -


- Show quoted text -


  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Specific formula query

Ah, perhaps I'm attempting something that can't be done?

Basically I want cell X to recognise when the value in cell Y shows any
value in the range 0-16 (and show 1 as a result) AND recognise when it shows
any value from 16-32 (and show 2 as a result) AND recognise when it shows any
value from 32-48 (and show 3 as a result) and so on...

Any clearer? Sorry...

"Pete_UK" wrote:

Yes, well put different values in X and see what you get out of the
formula!

I don't understand how you can have the

...."value in cell X is 16 or less ... AND if value in cell X is more
than 16 ..."

at the same time. Are you refering to a range of cells, eg from A1 to
A10, and so you could have different values in some of those cells?

What is the cell reference of cell X and cell Y ?

Pete


On Dec 5, 7:36 pm, TomL77 wrote:
Cheers Pete, that's a start but I should have been more specific:

If value in cell X is 16 or less, I want cell Y to show value "1" AND if
value in cell X is more than 16, but less than or equal to 32, I want cell Y
to show value "2"
AND if value in cell X is more than 32, but less than or equal to 48, I want
cell Y to show value "3", and so on...

(Cell X being the same cell on the same spreadsheet all the way through)

Does this clarify?



"Pete_UK" wrote:
Here's one way of doing it:


=INT(CEILING(X,16)/16)


Put the formula in your Y cell, changing X to an appropriate cell
reference.


Hope this helps.


Pete


On Dec 5, 7:15 pm, TomL77 wrote:
Excel 2003


I want a cell to show a different value depending on whether another cell
shows less than, equal to, or more than a range of values. For example:


If value in cell X is 16 or less, I want cell Y to show 1
If value in cell X is more than 16, but less than or equal to 32, I want
cell Y to show 2
If value in cell X is more than 32, but less than or equal to 48, I want
cell Y to show 3
And so on...
Help please, can't seem to create the right syntax to make this happen...
Thanks- Hide quoted text -


- Show quoted text -



  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Specific formula query

That is what the formula does, although you have now swapped around X
and Y in your description. Suppose cell X is A1, and this can take any
positive value, and suppose B1 is your original Y, and you want this
to show 1, 2, 3 etc depending on the value of A1.

Put 5 in A1 and this formula in B1:

=INT(CEILING(A1,16)/16)

You should see 1 in B1, because A1 is less than 16. Put 16 in A1, and
B1 will show 1 still. Put 17 in A1 and B1 will now show 2, because A1
(your cell X) is between 16 and 32. You can put 30 in A1, and B1 will
still show 2. Change A1 to 39, and B1 will show 3, because A1 is
between 32 and 48. Change A1 again to 10, and B1 will show 1.

Isn't this what you want?

By the way, if A1 is empty or contains 0 then the formula will return
0 in B1. If you want B1 to show 1 in this case, then change the
formula to:

=MAX(1,INT(CEILING(A1,16)/16))

Hope this helps.

Pete

On Dec 5, 8:06 pm, TomL77 wrote:
Ah, perhaps I'm attempting something that can't be done?

Basically I want cell X to recognise when the value in cell Y shows any
value in the range 0-16 (and show 1 as a result) AND recognise when it shows
any value from 16-32 (and show 2 as a result) AND recognise when it shows any
value from 32-48 (and show 3 as a result) and so on...

Any clearer? Sorry...



"Pete_UK" wrote:
Yes, well put different values in X and see what you get out of the
formula!


I don't understand how you can have the


...."value in cell X is 16 or less ... AND if value in cell X is more
than 16 ..."


at the same time. Are you refering to a range of cells, eg from A1 to
A10, and so you could have different values in some of those cells?


What is the cell reference of cell X and cell Y ?


Pete


On Dec 5, 7:36 pm, TomL77 wrote:
Cheers Pete, that's a start but I should have been more specific:


If value in cell X is 16 or less, I want cell Y to show value "1" AND if
value in cell X is more than 16, but less than or equal to 32, I want cell Y
to show value "2"
AND if value in cell X is more than 32, but less than or equal to 48, I want
cell Y to show value "3", and so on...


(Cell X being the same cell on the same spreadsheet all the way through)


Does this clarify?


"Pete_UK" wrote:
Here's one way of doing it:


=INT(CEILING(X,16)/16)


Put the formula in your Y cell, changing X to an appropriate cell
reference.


Hope this helps.


Pete


On Dec 5, 7:15 pm, TomL77 wrote:
Excel 2003


I want a cell to show a different value depending on whether another cell
shows less than, equal to, or more than a range of values. For example:


If value in cell X is 16 or less, I want cell Y to show 1
If value in cell X is more than 16, but less than or equal to 32, I want
cell Y to show 2
If value in cell X is more than 32, but less than or equal to 48, I want
cell Y to show 3
And so on...
Help please, can't seem to create the right syntax to make this happen...
Thanks- Hide quoted text -


- Show quoted text -- Hide quoted text -


- Show quoted text -


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
query formula zuyya Excel Discussion (Misc queries) 2 October 12th 06 01:15 AM
Query Items Listed During a Specific Time Period DukeDevil Excel Discussion (Misc queries) 0 July 6th 06 08:40 PM
formula Query Carlie Excel Discussion (Misc queries) 2 April 19th 06 05:15 PM
Query into specific columns Gules Excel Discussion (Misc queries) 0 July 25th 05 04:36 PM
Converting an Excel formula to an Access query formula Adam Excel Discussion (Misc queries) 1 December 15th 04 03:38 AM


All times are GMT +1. The time now is 01:35 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"