Combining Data from 3 Cells into 1

jarrodexcel

New Member
Joined
Dec 14, 2022
Messages
23
Office Version
  1. 365
Platform
  1. Windows
Hey guys, bit of a tricky one here and would love some help, will try explain as well as i can.

In the cells below i have A1-C3,

A1 tells me if the action has been completed, No means it hasn't and so no.

B1 tells me the device used

C3 tells me the product

The formula i am after will combine these 3 into the final result(Exhibit B), shown below the table (Exhibit A)

So if A1 Is Yes then i dont want any data for it as it is irrelevant. But if A1 is No i do and i would like this NO to become a "1x".


When the data comes in i need all No's and their corresponding data from the other two cells to combine. If there is a was a way to shorten the SmartDrive etc to just say SD or SW that would be amazing but no worries if not.

Any questions feel free to shoot ! Thankyou


(Exhibit A)
A1 B1 C3
No, Yes, No, YesSmartDrive,SmartDrive,SmartWheel,SmartStream2999-Banana floor,2111-Pear Branch,1235-White apple,1211-Apple tree

(Exhibit B)
Final result -
1x SD2999-Banana floor, 1xSW1235-White apple
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
How about
Fluff.xlsm
ABC
1No, Yes, No, YesSmartDrive,SmartDrive,SmartWheel,SmartStream2999-Banana floor,2111-Pear Branch,1235-White apple,1211-Apple tree
2
31x SD2999-Banana floor, 1x SW1235-White apple
Main
Cell Formulas
RangeFormula
A3A3="1x "&TEXTJOIN(", 1x ",,IF(TEXTSPLIT(A1,", ")="No",LEFT(REPLACE(TEXTSPLIT(B1,","),2,4,""),2)&TEXTSPLIT(C1,","),""))
 
Upvote 0
Solution
How about
Fluff.xlsm
ABC
1No, Yes, No, YesSmartDrive,SmartDrive,SmartWheel,SmartStream2999-Banana floor,2111-Pear Branch,1235-White apple,1211-Apple tree
2
31x SD2999-Banana floor, 1x SW1235-White apple
Main
Cell Formulas
RangeFormula
A3A3="1x "&TEXTJOIN(", 1x ",,IF(TEXTSPLIT(A1,", ")="No",LEFT(REPLACE(TEXTSPLIT(B1,","),2,4,""),2)&TEXTSPLIT(C1,","),""))
Hi Fluff !

this is almost perfect ! the only issue I'm having is when i download my data the A1 section has no spaces. So it goes No,Yes,No,Yes etc which causes the formula to fail. Any way to fix this or i will have to enter spaces between them all constantly ?


Update -

Don't worry ! i spotted the space in the formula and all works well now !!

Thank you again Fluff, you are my hero !!!!
 
Upvote 0

Forum statistics

Threads
1,224,818
Messages
6,181,151
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top