Exclude "0" values from string: =H2&";"&I2&"
Closed
Pluggie
Posts
13
Registration date
Monday March 11, 2013
Status
Member
Last seen
August 14, 2013
-
Apr 12, 2013 at 09:17 AM
aquarelle Posts 7119 Registration date Saturday April 7, 2007 Status Moderator Last seen October 18, 2022 - Apr 12, 2013 at 03:10 PM
aquarelle Posts 7119 Registration date Saturday April 7, 2007 Status Moderator Last seen October 18, 2022 - Apr 12, 2013 at 03:10 PM
Related:
- Exclude "0" values from string: =H2&";"&I2&"
- &0 - Excel Forum
- Based on the values in cells b77 b81 ✓ - Excel Forum
- //192.168.l.0 - Guide
- Diskette drive 0 seek failure ✓ - Hard Drive & SSD Forum
- Unexpected t string php - Guide
1 reply
aquarelle
Posts
7119
Registration date
Saturday April 7, 2007
Status
Moderator
Last seen
October 18, 2022
491
Apr 12, 2013 at 03:10 PM
Apr 12, 2013 at 03:10 PM
Hello,
Do you have some knowledge about VBA macro?
Because with VBA it is possible to create a custom function.
First, press alt+F11 to open VBA editor and insert a module. Paste this custom function into this module :
To use it on your sheet ---> insert / function / custom and select ConcatPlageNotEmptyCel.
This function expects two parameters:
- range : the range of cells you want to concatenate (selected with the mouse)
- separator : the character separating each cell (1 or more characters) but if the separator is not specified, the default is defined by ";"
Best regards
"Pour trouver une solution à ses problèmes, il faut s'en donner la peine."
Do you have some knowledge about VBA macro?
Because with VBA it is possible to create a custom function.
First, press alt+F11 to open VBA editor and insert a module. Paste this custom function into this module :
Function ConcatPlageNotEmptyCel(plage As range, Optional separator As String = "; ") As String Dim rep As String, c As range For Each c In plage If c.Value <> "" Then rep = rep & c.Value & separator End If Next c ConcatPlageNotEmptyCel = Left(rep, Len(rep) - Len(separator)) End Function
To use it on your sheet ---> insert / function / custom and select ConcatPlageNotEmptyCel.
This function expects two parameters:
- range : the range of cells you want to concatenate (selected with the mouse)
- separator : the character separating each cell (1 or more characters) but if the separator is not specified, the default is defined by ";"
Best regards
"Pour trouver une solution à ses problèmes, il faut s'en donner la peine."