Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-18-2018, 12:30 PM
LearnerExcel LearnerExcel is offline Query related to Concatenate? Windows 7 32bit Query related to Concatenate? Office 2013
Advanced Beginner
Query related to Concatenate?
 
Join Date: Nov 2016
Posts: 82
LearnerExcel will become famous soon enoughLearnerExcel will become famous soon enough
Default Query related to Concatenate?

How can I do the following in Excel Worksheet?



If cell A1 is not equal to blank then it should concatenate A1 & B1 adding in between "-" (Result sahll be in C1) as shown in the image.
Else
It should remove "-".

=CONCATENATE(A1,"-",B1) 'It needs to be modified.
Attached Images
File Type: png Concatenate Query.PNG (1.9 KB, 16 views)
Reply With Quote
  #2  
Old 02-18-2018, 02:59 PM
jeffreybrown jeffreybrown is offline Query related to Concatenate? Windows Vista Query related to Concatenate? Office 2007
Expert
 
Join Date: Apr 2016
Posts: 673
jeffreybrown has a spectacular aura aboutjeffreybrown has a spectacular aura about
Default

One way...

=A1&IF(A1<>"","-","")&B1

or

=IF(A1<>"",A1&"-"&B1,B1)
Reply With Quote
  #3  
Old 02-18-2018, 07:43 PM
LearnerExcel LearnerExcel is offline Query related to Concatenate? Windows 7 32bit Query related to Concatenate? Office 2013
Advanced Beginner
Query related to Concatenate?
 
Join Date: Nov 2016
Posts: 82
LearnerExcel will become famous soon enoughLearnerExcel will become famous soon enough
Default

Thank you so much.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Query related to Concatenate? Concatenate b16 Excel 1 01-09-2017 04:51 PM
Query and Power Query not working Excel 2016 bl10 Excel 0 07-22-2016 06:25 PM
Query related to Concatenate? concatenate the currency too isasa74 Excel Programming 24 12-20-2015 06:01 AM
ms office related query d19123 Office 0 07-02-2013 05:48 AM
How to Query Text in MS-Excel 2010 or Import Data & Query outside of Excel? mag Excel 0 10-18-2012 11:15 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:13 PM.


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