![]() |
|
#1
|
|||
|
|||
|
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. |
|
#2
|
|||
|
|||
|
One way...
=A1&IF(A1<>"","-","")&B1 or =IF(A1<>"",A1&"-"&B1,B1) |
|
#3
|
|||
|
|||
|
Thank you so much.
|
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
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 |
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 |