Group data from column into separate rows horizontally

chhantelravi

New Member
Joined
Aug 11, 2020
Messages
6
Office Version
  1. 2016
  2. 2013
Platform
  1. Windows
Hi Everyone,

I have a data file which looks like below attachment.
1597141342755.png

I need to modify it as per my report format which is attached below.
1597141447677.png


Its really time consuming and hectic for huge files. So can anyone have any idea how to do this?
I would really appreciate help from excel geniuses..
Thanks
Ravi
 

Attachments

  • 1597141167261.png
    1597141167261.png
    24.3 KB · Views: 2
Just looked at this again and not sure why I made it like that. The formula for columns H, I, J, .. could be simpler ..

chhantelravi 2020-08-12 1.xlsm
ABCDEFGHIJ
1Original formatRequired Format
2Vr refAccount NameDr. AmountCr. AmountAccount Nametransaction1transaction2transaction3
31Labour Charges266111.1111Labour Charges1266111.11  
41Labour Charges Payable263450Labour Charges Payable1(263450.00)  
51Withholding Tax - SST (1%)2661.111111Withholding Tax - SST (1%)1(2661.11)  
62Intercompany Transactions - SMSK- TIGER60000Intercompany Transactions - SMSK- TIGER2 60000.00 
72TDS Receivables1500TDS Receivables2 1500.00 
82Sundry Debtros Control Account61500Sundry Debtros Control Account2 (61500.00) 
93Intercompany Transactions190000Intercompany Transactions3  190000.00
103TDS Receivables30000TDS Receivables3  30000.00
113Sundry Debtros Control Account220000Sundry Debtros Control Account3  (220000.00)
Sheet3
Cell Formulas
RangeFormula
F3:F11F3=B3
G3:G11G3=G2+(A3<>A2)
H3:J11H3=IF(COLUMNS($H:H)=$G3,IF($D3="",$C3,-$D3),"")



.. or if columns C:D are not formulas ..

chhantelravi 2020-08-12 1.xlsm
ABCDEFGHIJ
2Vr refAccount NameDr. AmountCr. AmountAccount Nametransaction1transaction2transaction3
31Labour Charges266111.1111Labour Charges1266111.11  
41Labour Charges Payable263450Labour Charges Payable1(263450.00)  
51Withholding Tax - SST (1%)2661.111111Withholding Tax - SST (1%)1(2661.11)  
62Intercompany Transactions - SMSK- TIGER60000Intercompany Transactions - SMSK- TIGER2 60000.00 
72TDS Receivables1500TDS Receivables2 1500.00 
82Sundry Debtros Control Account61500Sundry Debtros Control Account2 (61500.00) 
93Intercompany Transactions190000Intercompany Transactions3  190000.00
103TDS Receivables30000TDS Receivables3  30000.00
113Sundry Debtros Control Account220000Sundry Debtros Control Account3  (220000.00)
Sheet4
Cell Formulas
RangeFormula
F3:F11F3=B3
G3:G11G3=G2+(A3<>A2)
H3:J11H3=IF(COLUMNS($H:H)=$G3,$C3-$D3,"")
Thanks again Peter. I have already did it to make it simple.
But as I was working on it, I was stuck with another problem. Thanks to you I used your logic and make it work.
You used Vr. ref column to drive the formula, mean with column function, you counted numbers and if its equal to Vr. ref column value it would give "+" or "-" figures. For example, the function will work only if "=column(H:H)=G3", it would return value or else 0.
But if I am working for any month, Say December, then Voucher ref will start from 1. So I have to perform it in 3 steps to get required format.
First I have to summarise total voucher number and give them serial number from 1. Then with vlookup, take serial number reference and finally use your formula.
I have attached a sample for your ref.
Excel working.xlsx
ABCDEFGHIJKLMNO
1Original formatReport format
2Vr refAccount NameDr. AmountCr. AmountVr refS.No.Vr refAccount NameTransaction1Transaction2Transaction3Transaction4
3JV2048Labour Charges266,111.11JV20481JV2048Labour Charges1266111.1111   
4JV2048Labour Charges Payable263,450.00JV20492JV2048Labour Charges Payable1-263450   
5JV2048Withholding Tax - SST (1%)2,661.11JV20503JV2048Withholding Tax - SST (1%)1-2661.111111   
6JV2049Intercompany Transactions - SMSK- TIGER60,000.00JV20514JV2049Intercompany Transactions - SMSK- TIGER2 60000  
7JV2049TDS Receivables1,500.00JV2049TDS Receivables2 1500  
8JV2049Sundry Debtros Control Account61,500.00JV2049Sundry Debtros Control Account2 -61500  
9JV2050Intercompany Transactions190,000.00JV2050Intercompany Transactions3  190000 
10JV2050TDS Receivables30,000.00JV2050TDS Receivables3  30000 
11JV2050Sundry Debtros Control Account220,000.00JV2050Sundry Debtros Control Account3  -220000 
12JV2050Employee Salary100,000.00JV2050Employee Salary3  100000 
13JV2050PF - Employers Contribution10,000.00JV2050PF - Employers Contribution3  10000 
14JV2050Gratuity10,000.00JV2050Gratuity3  10000 
15JV2050Accomodation Allowance50,000.00JV2050Accomodation Allowance3  50000 
16JV2050Salary Payable115,000.00JV2050Salary Payable3  -115000 
17JV2050Withholding Tax - SST (1%)10,000.00JV2050Withholding Tax - SST (1%)3  -10000 
18JV2050Withholding Tax - Salary (15%)25,000.00JV2050Withholding Tax - Salary (15%)3  -25000 
19JV2050PF Payable10,000.00JV2050PF Payable3  -10000 
20JV2050Gratuity Payable10,000.00JV2050Gratuity Payable3  -10000 
21JV2051NSBL-CA-BHW60,000.00JV2051NSBL-CA-BHW4   60000
22JV2051PCBL - BHW_Account60,000.00JV2051PCBL - BHW_Account4   -60000
Sheet4
Cell Formulas
RangeFormula
K3:K22K3=VLOOKUP(I3,$F$3:$G$6,2,0)
L3:O22L3=IF(COLUMNS($L:L)=$K3,IF($D3="",$C3,-$D3),"")


I am trying to do this without Vr. ref.
From your previous question "what trigger this?", There is nothing to trigger. Management want transaction report in this format. So I am working on it.
Thanks
 
Upvote 0

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
But if I am working for any month, Say December, then Voucher ref will start from 1. So I have to perform it in 3 steps to get required format.
First I have to summarise total voucher number and give them serial number from 1.
Why do you have to do that? If you use my formulas as they were it works doesn't it?

Here is your sheet from post 11. I have removed that lookup data from columns F:G and replaced your column K VLOOKUP with the simple formula I posted before (this time I have pointed it at column I but column A would still work too.). Results look the same to me.

chhantelravi 2020-08-12 1.xlsm
ABCDEFGHIJKLMNO
1Original formatReport format
2Vr refAccount NameDr. AmountCr. AmountVr refAccount NameTransaction1Transaction2Transaction3Transaction4
3JV2048Labour Charges266111.1111JV2048Labour Charges1266111.1111   
4JV2048Labour Charges Payable263450JV2048Labour Charges Payable1-263450   
5JV2048Withholding Tax - SST (1%)2661.111111JV2048Withholding Tax - SST (1%)1-2661.111111   
6JV2049Intercompany Transactions - SMSK- TIGER60000JV2049Intercompany Transactions - SMSK- TIGER2 60000  
7JV2049TDS Receivables1500JV2049TDS Receivables2 1500  
8JV2049Sundry Debtros Control Account61500JV2049Sundry Debtros Control Account2 -61500  
9JV2050Intercompany Transactions190000JV2050Intercompany Transactions3  190000 
10JV2050TDS Receivables30000JV2050TDS Receivables3  30000 
11JV2050Sundry Debtros Control Account220000JV2050Sundry Debtros Control Account3  -220000 
12JV2050Employee Salary100000JV2050Employee Salary3  100000 
13JV2050PF - Employers Contribution10000JV2050PF - Employers Contribution3  10000 
14JV2050Gratuity10000JV2050Gratuity3  10000 
15JV2050Accomodation Allowance50000JV2050Accomodation Allowance3  50000 
16JV2050Salary Payable115000JV2050Salary Payable3  -115000 
17JV2050Withholding Tax - SST (1%)10000JV2050Withholding Tax - SST (1%)3  -10000 
18JV2050Withholding Tax - Salary (15%)25000JV2050Withholding Tax - Salary (15%)3  -25000 
19JV2050PF Payable10000JV2050PF Payable3  -10000 
20JV2050Gratuity Payable10000JV2050Gratuity Payable3  -10000 
21JV2051NSBL-CA-BHW60000JV2051NSBL-CA-BHW4   60000
22JV2051PCBL - BHW_Account60000JV2051PCBL - BHW_Account4   -60000
Sheet5 (2)
Cell Formulas
RangeFormula
K3:K22K3=K2+(I3<>I2)
L3:O22L3=IF(COLUMNS($L:L)=$K3,IF($D3="",$C3,-$D3),"")
 
Upvote 0

Forum statistics

Threads
1,215,029
Messages
6,122,760
Members
449,095
Latest member
m_smith_solihull

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