vba merge cells with semicolon
excel can be most frustrating at times! i simply want to correct the .bcc line for this emailing macro to work. i'm wanting everything in cells au7:au107 to be added to my bcc line in an outlook email but separated by a semicolon ( ; ). would appreciate some support so i can move on to the next challenge!!!

sub emailjuniors()

 dim outapp as object
 dim outmail as object

 with application
 .enableevents = false
 .screenupdating = false
 end with

 set outapp = createobject("outlook.application")
 set outmail = outapp.createitem(0)

 on error resume next
 with outmail
 .to = range("")
 .cc = range("")
 .bcc = join(application.transpose(.range("au7:au107").value), ";") & ";"
 .subject = range("ap3")
 .body = range("ao2") & vblf & \_
 "" & vblf & \_
 .display
 end with
 on error goto 0

 with application
 .enableevents = true
 .screenupdating = true
 end with

 set outmail = nothing
 set outapp = nothing
end sub
try removeing the full stop in front of range
you are missing a semicolon at the end :) worked around it with excel vba as uipath didnt work You will probably need to write a VBA macro that does this. Formatting is not pushed down from the workbook that the user opened to the workbook that holds the source data. i would do it like this:

https://www.advanced-excel.com/columns-to-rows.html hi [@rpatest\_pwc](/u/rpatest_pwc)

have you checked if your column in excel has any spaces before or after the actual word suma? Are you close:



```
/\_\_((?!\_\_).)*\_\_/

        

        
        
        
 (adsbygoogle = window.adsbygoogle || []).push({});
 
        

    
```

works. The star must be outside the repeating group, so the scan is performed at each position, not immediately after the presenter `__`
  




 (adsbygoogle = window.adsbygoogle || []).push({});
 
  

.



  




 (adsbygoogle = window.adsbygoogle || []).push({});
 
  

Since this does not display the correct text (I am assuming you want the content between the double underscores to be captured), you probably want



```
/\_\_((?:(?!\_\_).)*)\_\_/

        

        
        
        
 (adsbygoogle = window.adsbygoogle || []).push({});
 
        

    
``` hi @checkout,if i was in your shoes. i would create a new view in your airtable for the records with completed ids. the use the airtable trigger “new record in view” select the correct view and create your action email from there.kind regards,https://www.seundebiyi.com/ hi, @ricky007 
create table bill\_stag
(
s\_categry varchar2(20),
s\_billnum varchar2(20)
);

insert into bill values('1111','5647859541785');
watch out! you're using two different table names there.
you don't care which m\_billnum\_seq gets assigned to which new row, do you? (you shouldn't.) in that case, you can simplify the cross join approach that cormaco suggested like this:
insert into bill\_mast (m\_bill\_seqnum, m\_billnum, channel) -- always name the columns
with  all\_channels  as
(
 select 'mob' as channel  from dual  union all
 select 'atm'      from dual
)
select  seq\_num.nextval
, s.s\_billnum
, c.channel
from     bill\_stag    s
cross join all\_channels c
;
you don't need order by, so you don't need the ord column and you don't need so an extra sub-query. You are mixing [expressions](https://docs.microsoft.com/en-us/dotnet/api/system.linq.expressions.expression?view=netframework-4.7.1) with [lambda expressions](https://docs.microsoft.com/en-us/dotnet/api/system.linq.expressions.lambdaexpression?view=netframework-4.7.1). There are many posts showing how you can combine lambda expressions, but the essential part is to compose expressions from lambda expression [bodies](https://docs.microsoft.com/en-us/dotnet/api/system.linq.expressions.lambdaexpression.body?view=netframework-4.7.1) and rebind the [parameters](https://docs.microsoft.com/en-us/dotnet/api/system.linq.expressions.lambdaexpression.parameters?view=netframework-4.7.1).


The later is usually achieved by a custom [`ExpressionVisitor`](https://docs.microsoft.com/en-us/dotnet/api/system.linq.expressions.expressionvisitor?view=netframework-4.7.1) like this:



```
using System.Linq.Expressions;

public static class ExpressionExtensions
{
    public static Expression ReplaceParameter(this Expression expression, ParameterExpression source, Expression target)
    {
        return new ParameterReplacer { Source = source, Target = target }.Visit(expression);
    }

    class ParameterReplacer : ExpressionVisitor
    {
        public ParameterExpression Source;
        public Expression Target;
        protected override Expression VisitParameter(ParameterExpression node)
        {
            return node == Source ? Target : base.VisitParameter(node);
        }
    }
}

```

Now regarding the EF Core combined query filters. 


Using dictionaries and expression lists seems overcomplicated for what are you doing. Since [`IMutableEntityType`](https://docs.microsoft.com/en-us/dotnet/api/microsoft.entityframeworkcore.metadata.imutableentitytype?view=efcore-2.1) provides read/write access to the [`QueryFilter`](https://docs.microsoft.com/en-us/dotnet/api/microsoft.entityframeworkcore.metadata.imutableentitytype.queryfilter?view=efcore-2.1#Microsoft_EntityFrameworkCore_Metadata_IMutableEntityType_QueryFilter), the same can be achieved with a small set of a custom extension methods.


All they go inside a class like this:



```
using System;
using System.Linq.Expressions;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

public static class QueryFilterExtensions
{
}

```

First method:



```
public static void AddQueryFilter(this IMutableEntityType target, LambdaExpression filter)
{
    if (target.QueryFilter == null)
        target.QueryFilter = filter;
    else
    {
        var parameter = target.QueryFilter.Parameters[0];
        var left = target.QueryFilter.Body;
        var right = filter.Body.ReplaceParameter(filter.Parameters[0], parameter);
        var body = Expression.AndAlso(left, right);
        target.QueryFilter = Expression.Lambda(body, parameter);
    }
}

```

This is a non generic method which combines the exiting filter with passed filter using `AndAlso` (C# `&&`) operator and shows the aforementioned lambda expression combining principles.


However it's not so useful directly, like inside your entity type configuration loop (it can, but requires you to build manually the lambda expression instead of letting C# compiler do that). So here comes the second method:



```
public static void AddQueryFilter<T>(this IMutableEntityType target, Expression<Func<T, bool>> filter)
{
    LambdaExpression targetFilter = filter;
    if (target.ClrType != typeof(T))
    {
        var parameter = Expression.Parameter(target.ClrType, "e");
        var body = filter.Body.ReplaceParameter(filter.Parameters[0], parameter);
        targetFilter = Expression.Lambda(body, parameter);
    }
    target.AddQueryFilter(targetFilter);
}

```

It's a generic method - not quite type-safe, but allows you to use a compile time lambda expression and bind it to the actual entity type as follows:



```
foreach (var entityType in modelBuilder.Model.GetEntityTypes())
{
    if (typeof(IDeleted).IsAssignableFrom(entityType.ClrType))
        entityType.AddQueryFilter<IDeleted>(e => e.DateTimeDeleted == null);
}

```

Looks better, isn't it :)


The last custom extension method is complement to (replacement of) the standard EF Core generic [`HasQueryFilter`](https://docs.microsoft.com/en-us/dotnet/api/microsoft.entityframeworkcore.metadata.builders.entitytypebuilder-1.hasqueryfilter?view=efcore-2.1#Microsoft_EntityFrameworkCore_Metadata_Builders_EntityTypeBuilder_1_HasQueryFilter_System_Linq_Expressions_Expression_System_Func__0_System_Boolean___) method:



```
public static EntityTypeBuilder<TEntity> AddQueryFilter<TEntity>(this EntityTypeBuilder<TEntity> target, Expression<Func<TEntity, bool>> filter)
    where TEntity : class
{
    target.Metadata.AddQueryFilter(filter);
    return target;
}

```

and allows you to replace



```
this.AddToDict<DbMyEntity>(t => t.Name == null || t.Name == "Something");

```

with the more convenient



```
modelBuilder.Entity<DbMyEntity>()
    .AddQueryFilter(t => t.Name == null || t.Name == "Something");

```

**Update (EF Core 3.0):** `QueryFilter` property has been replaced with `GetQueryFilter` and `SetQueryFilter` extension methods. The behaviour must be because you are appending the same array to both of the arrays.  

Try appending a different array for cell*code and cell*type separately.