Forum Discussion
aijatiw
Nov 03, 2023Copper Contributor
An UDF for Concatenate Function
Hello I was wondering whether it is possible to achieve this result using VBA/UDF? https://ibb.co/2yn729f Basically what I wanted to do is to be able to concatenate various string fr...
aijatiw
Nov 03, 2023Copper Contributor
Thank you for you dedication to my problem.
Maybe I need to elaborate more clearly what I am trying to achieve. Here is a new image
https://ibb.co/44tSnkk
I have this fruit, qty and a when column. Then, I will share this excel file to other people, What I want to do is that they can get different result based on what cells or combination that they like.
How to do that? And also the data for each column are fixed but the result should be vary.
Maybe I need to elaborate more clearly what I am trying to achieve. Here is a new image
https://ibb.co/44tSnkk
I have this fruit, qty and a when column. Then, I will share this excel file to other people, What I want to do is that they can get different result based on what cells or combination that they like.
How to do that? And also the data for each column are fixed but the result should be vary.
peiyezhu
Nov 04, 2023Bronze Contributor
Cartesian_product?
select * from basic_Cartesian_product;
with a as(select f01 from basic_Cartesian_product where f01<>''),
b as (select f02 from basic_Cartesian_product where f02<>''),
c as(select f03 from basic_Cartesian_product where f03<>''),
d as (select f04 from basic_Cartesian_product where f04<>'')
select f01||' '||f03||f02||' '||f04 result from a,b,c,d;
f01 f02 f03 f04
| student with name | is now on year | Mike | 1 |
| Donna | 2 | ||
| Lula | |||
| Naomi | |||
| Luca |
result
| student with name Mikeis now on year 1 |
| student with name Mikeis now on year 2 |
| student with name Donnais now on year 1 |
| student with name Donnais now on year 2 |
| student with name Lulais now on year 1 |
| student with name Lulais now on year 2 |
| student with name Naomiis now on year 1 |
| student with name Naomiis now on year 2 |
| student with name Lucais now on year 1 |
| student with name Lucais now on year 2 |