Amalgamating ranges and removing empty cells

picklefactory

Well-known Member
Joined
Jan 28, 2005
Messages
506
Office Version
  1. 365
Platform
  1. Windows
Hi folks
Hoping for some help please..... as always :(
Not sure how to even ask the right question on this one. I'm adding a sheet to an existing payroll timesheet WB and I need to somehow merge 3 sets of 3 columns into a single set of 3 columns. Each source set can contain blank rows, which I also need to remove. The best thing I can think of to explain is to show you what I have as source, and what I'd like it to finish up as. I have no idea if this would be VBA or an array formula maybe, I have no preference. Any help or advice as to how to go about it would be gratefully received.
This is the source data format

397BASIC HOURS54397SHIFT ALLOWANCE54
494BASIC HOURS26.5494HOL PAY27
392BASIC HOURS40
566BASIC HOURS42
647BASIC HOURS40
645BASIC HOURS22645SHIFT ALLOWANCE22645HOL PAY22
657BASIC HOURS31.5
683BASIC HOURS27683HOL PAY15
685BASIC HOURS17.75
688BASIC HOURS42
689BASIC HOURS32.5689HOL PAY9
693BASIC HOURS42
695BASIC HOURS33
696BASIC HOURS25.5
697BASIC HOURS40
698BASIC HOURS40
372BASIC HOURS42
505BASIC HOURS44505SHIFT ALLOWANCE44
604BASIC HOURS23
147HOL PAY44
222BASIC HOURS36



And this is how I'd like it to end up if at all possible.

397BASIC HOURS54
494BASIC HOURS26.5
392BASIC HOURS40
566BASIC HOURS42
647BASIC HOURS40
645BASIC HOURS22
657BASIC HOURS31.5
683BASIC HOURS27
685BASIC HOURS17.75
688BASIC HOURS42
689BASIC HOURS32.5
693BASIC HOURS42
695BASIC HOURS33
696BASIC HOURS25.5
697BASIC HOURS40
698BASIC HOURS40
372BASIC HOURS42
505BASIC HOURS44
604BASIC HOURS23
222BASIC HOURS36
397SHIFT ALLOWANCE54
645SHIFT ALLOWANCE22
505SHIFT ALLOWANCE44
494HOL PAY27
645HOL PAY22
683HOL PAY15
689HOL PAY9
147HOL PAY44
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
How about
Fluff.xlsm
ABCDEFGHIJKLM
1
2397BASIC HOURS54397SHIFT ALLOWANCE54397BASIC HOURS54
3494BASIC HOURS26.5494HOL PAY27494BASIC HOURS26.5
4392BASIC HOURS40392BASIC HOURS40
5566BASIC HOURS42566BASIC HOURS42
6647BASIC HOURS40647BASIC HOURS40
7645BASIC HOURS22645SHIFT ALLOWANCE22645HOL PAY22645BASIC HOURS22
8657BASIC HOURS31.5657BASIC HOURS31.5
9683BASIC HOURS27683HOL PAY15683BASIC HOURS27
10685BASIC HOURS17.75685BASIC HOURS17.75
11688BASIC HOURS42688BASIC HOURS42
12689BASIC HOURS32.5689HOL PAY9689BASIC HOURS32.5
13693BASIC HOURS42693BASIC HOURS42
14695BASIC HOURS33695BASIC HOURS33
15696BASIC HOURS25.5696BASIC HOURS25.5
16697BASIC HOURS40697BASIC HOURS40
17698BASIC HOURS40698BASIC HOURS40
18372BASIC HOURS42372BASIC HOURS42
19505BASIC HOURS44505SHIFT ALLOWANCE44505BASIC HOURS44
20604BASIC HOURS23604BASIC HOURS23
21147HOL PAY44222BASIC HOURS36
22397SHIFT ALLOWANCE54
23222BASIC HOURS36645SHIFT ALLOWANCE22
24505SHIFT ALLOWANCE44
25494HOL PAY27
26645HOL PAY22
27683HOL PAY15
28689HOL PAY9
29147HOL PAY44
30
Sheet6
Cell Formulas
RangeFormula
K2:M29K2=LET(d,VSTACK(A2:C100,D2:F100,G2:I100),FILTER(d,INDEX(d,,1)<>""))
Dynamic array formulas.
 
Upvote 0
Solution
You lot are far to clever for your own good!!!! I've never even heard of a LET formula.
Brilliant, works a treat.
Thank you very muchly indeed Fluff, I've been scratching my head on it for hours and it took you about 2 minutes
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,110
Messages
6,123,138
Members
449,098
Latest member
Doanvanhieu

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