Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Include a value from one cell within text of another cell.

In my spreadsheet, users are prompted to enter a value into cell B4. Multiple
peices of information are then returned based on what they entered, But
certain numbers are not valid (for instance 25 through 150). If an invalid
value is entered, I would like cell B5 to return something like:

" X is not a valid entry. Please enter the correct pair number."

I would like the cell to actually reference B4 so the number they typed will
appear where the "X" is. The only way I know how to do this would be to make
B5 equal another cell (lets say Z1).
Z1 would then contain =IF(B4=25," 25 is not a valid entry. Please enter the
correct pair number.",Z2)

Then Z2 would contain a similar formula for if they entered 26. There has
got to be a better way to do this, but I don't know what it is.

Thanks for your help.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default Include a value from one cell within text of another cell.

If all numbers from 25 to 150 inclusive are invalid, then you could do
this in B5:

=IF(AND(B4=25,B4<=150),B4&" is not a valid entry etc",B4)

Hope this helps.

Pete

On Apr 14, 3:48*pm, CedarHillMatt
wrote:
In my spreadsheet, users are prompted to enter a value into cell B4. Multiple
peices of information are then returned based on what they entered, But
certain numbers are not valid (for instance 25 through 150). If an invalid
value is entered, I would like cell B5 to return something like:

" X is not a valid entry. Please enter the correct pair number."

I would like the cell to actually reference B4 so the number they typed will
appear where the "X" is. The only way I know how to do this would be to make
B5 equal another cell (lets say Z1).
Z1 would then contain =IF(B4=25," 25 is not a valid entry. Please enter the
correct pair number.",Z2)

Then Z2 would contain a similar formula for if they entered 26. There has
got to be a better way to do this, but I don't know what it is.

Thanks for your help.


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
Multiply Cell Values which include text units DaveR Excel Worksheet Functions 7 April 3rd 23 04:30 PM
IF function results to include both text and cell value Helene Excel Discussion (Misc queries) 2 October 28th 09 06:08 PM
How do I include part of a cell in text (string?) in another cell? Chris Mitchell Excel Worksheet Functions 2 June 25th 07 10:08 AM
How do I include TEXT in the same cell with a FORMULA? NJCHAZ Excel Discussion (Misc queries) 2 June 21st 07 05:39 PM
how to include a cell reference that is contained in a cell withi. dutchinny Excel Worksheet Functions 5 October 24th 05 01:07 AM


All times are GMT +1. The time now is 09:34 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"