Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-10-2023, 08:26 PM
14spar15 14spar15 is offline Problem with IF formula Windows 7 64bit Problem with IF formula Office 2010 64bit
Advanced Beginner
Problem with IF formula
 
Join Date: Mar 2011
Posts: 97
14spar15 is on a distinguished road
Default Problem with IF formula


Hello, If there is a “?” in Column A , I want column B to be everything to the left of the “?”. This seems to work fine. If there is no “?” in column A then I want column B to be equal to column A but when this happens I get “#VALUE!”. Here is my formula - =IF(A2="","",IF(FIND("?",A2),LEFT(A2,FIND("?",A2)-1),A2)). I can’t seem to fix this. What I want is shown in column C. Thanks
Attached Files
File Type: xlsm Book1.xlsm (11.3 KB, 5 views)
Reply With Quote
  #2  
Old 05-10-2023, 11:46 PM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline Problem with IF formula Windows 10 Problem with IF formula Office 2021
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,766
Pecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant future
Default

Try
Code:
=IF(A2="","",IF(ISNUMBER(FIND("?",A2)),LEFT(A2,FIND("?",A2)-1),A2))
If FIND does not find the value, it returns a VALUE error. Wrapping with ISNUMBER does the trick
Attached Files
File Type: xlsm Book1.xlsm (12.3 KB, 0 views)
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post
Reply With Quote
  #3  
Old 05-11-2023, 06:56 AM
14spar15 14spar15 is offline Problem with IF formula Windows 7 64bit Problem with IF formula Office 2010 64bit
Advanced Beginner
Problem with IF formula
 
Join Date: Mar 2011
Posts: 97
14spar15 is on a distinguished road
Default

Great information....Thanks
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with IF formula Formula Problem CaronBaines Excel 7 01-09-2017 05:30 PM
Problem with IF formula Formula Problem pikerman Excel 2 02-16-2015 01:38 AM
Problem with IF formula Problem with formula! Victoria Linen Excel 1 02-04-2014 01:10 PM
Problem with IF formula Embedded IF AND OR Formula Problem J Morrow Excel 9 08-26-2011 06:51 AM
Formula problem? markg2 Excel 11 06-10-2010 07:42 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:04 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft