PDA

View Full Version : Table format to rows Macro



vsgmpudi
06-03-2023, 11:51 PM
Hi Everyone, My query is there are 6 tabluar forms which i want to convert into rows there are merged cells i dont mind getting blank rows i have pasted 6 like that tables and the required format also is attached

Thanks in advance

Aussiebear
06-04-2023, 12:22 AM
Welcome to VBAX vsgmpudi. Not sure what happened with your text but it went screwy. I've taken the liberty of fixing it up so it's readable for everyone. Now where to start.... Merged cells, absolutely a problem child for VBA. Are you certain that the layout cannot be constructed without the use of merged cells?

Paul_Hossler
06-04-2023, 07:37 AM
I don't think the merged cells will cause a problem.

I just used straight forward formulas

A simple macro could be used to append forms to the table as new rows

Aussiebear
06-04-2023, 03:40 PM
Thank you for a solution Paul, but I ( maybe it's just me), can't feel any vibes from it. The more I look at vsgmpudi's approach here the less I feel comfortable as to where this is going. I strongly believe that this is yet again in improper use of Excel. Since we appear to be simply recording data as opposed to carrying out calculations, a database solution would seem to be more appropriate. Hey, each to our own I guess.

Paul_Hossler
06-04-2023, 05:24 PM
Thank you for a solution Paul, but I ( maybe it's just me), can't feel any vibes from it. The more I look at vsgmpudi's approach here the less I feel comfortable as to where this is going. I strongly believe that this is yet again in improper use of Excel. Since we appear to be simply recording data as opposed to carrying out calculations, a database solution would seem to be more appropriate. Hey, each to our own I guess.


Well ... I might be reading too much into OP's #1 ...



i have pasted 6 like that tables


.. but I felt like there were 6 source worksheets to go into the summary worksheet, but didn't want to invest much time into a macro based on lack of knowledge

Merged cells aren't the real issue.

I'd do a macro that copies each source worksheet's data to the next row on the summary

jolivanes
06-05-2023, 02:14 PM
Re: "Merged cells aren't the real issue."
Maybe not now but I think it is generally frowned upon to use.
IMHO, we should inform people, after all OP has only his/hers first Post, that that can result in problems in the future.
As with most things, there are usually ways to get around it but why do that if you don't have to by getting used to not using it at all.
Sure that Paul & Aussiebear are familiar with these sites but maybe the OP can make up his/her mind if he/she thinks it is needed.

https://edu.gcfglobal.org/en/excel-tips/why-you-should-avoid-merging-cells/1/
https://theexcelclub.com/stop-do-not-merge-cells-in-excel-heres-why-with-fixes/
https://www.perfectxl.com/excel-tools/perfectxl-risk-eliminator/do-not-merge-cells/