Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,670
Default How to do it in excel?

Does anyone have any suggestions on how to do it in excel?

There is a list of odd numbers under A column
1,3,5,7,9,...
When I input any number in cell B1, such as 7.8, then it should return 7 in
cell C1, because 7.8 is closer to 7 than 9.
When I input any number in cell B1, such as 8.1, then it should return 9 in
cell C1, because 8.1 is closer to 9 than 7.
When I input any number in cell B1, such as 8, then it should return 7 in
cell C1, because it is my preference.
Does anyone have any suggestions?
Thanks in advance for any suggestions
Eric
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default How to do it in excel?

Are the values desired in column C related in any way to the data present in
column A ?
--
Gary''s Student


"Eric" wrote:

Does anyone have any suggestions on how to do it in excel?

There is a list of odd numbers under A column
1,3,5,7,9,...
When I input any number in cell B1, such as 7.8, then it should return 7 in
cell C1, because 7.8 is closer to 7 than 9.
When I input any number in cell B1, such as 8.1, then it should return 9 in
cell C1, because 8.1 is closer to 9 than 7.
When I input any number in cell B1, such as 8, then it should return 7 in
cell C1, because it is my preference.
Does anyone have any suggestions?
Thanks in advance for any suggestions
Eric

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 310
Default How to do it in excel?

try this (quite long - i bet there is a shorter solution!)

=IF((B3-(ODD(B3)-2))<1,ODD(B3)-2,(IF((B3-(ODD(B3)-2))1,CEILING(B3,1),(ODD(B3)-2))))

hope this helps,
michelle

"Eric" wrote:

Does anyone have any suggestions on how to do it in excel?

There is a list of odd numbers under A column
1,3,5,7,9,...
When I input any number in cell B1, such as 7.8, then it should return 7 in
cell C1, because 7.8 is closer to 7 than 9.
When I input any number in cell B1, such as 8.1, then it should return 9 in
cell C1, because 8.1 is closer to 9 than 7.
When I input any number in cell B1, such as 8, then it should return 7 in
cell C1, because it is my preference.
Does anyone have any suggestions?
Thanks in advance for any suggestions
Eric

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 947
Default How to do it in excel?

such as 8, then it should return 7 in
cell C1, because it is my preference.


I may be wrong, but I think this is correct...

=ODD(A1-1)

--
HTH :)
Dana DeLouis


"Eric" wrote in message
...
Does anyone have any suggestions on how to do it in excel?

There is a list of odd numbers under A column
1,3,5,7,9,...
When I input any number in cell B1, such as 7.8, then it should return 7
in
cell C1, because 7.8 is closer to 7 than 9.
When I input any number in cell B1, such as 8.1, then it should return 9
in
cell C1, because 8.1 is closer to 9 than 7.
When I input any number in cell B1, such as 8, then it should return 7 in
cell C1, because it is my preference.
Does anyone have any suggestions?
Thanks in advance for any suggestions
Eric



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



All times are GMT +1. The time now is 08:47 PM.

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

About Us

"It's about Microsoft Excel"