Hi All,

I have a string with comma separated values (say N values)
(E.g. 233, 127, 139, 38, 560, 72, 56, 67, 45, 232, 28, 242, 344, 234, 034, 
072, 342, 34, 5, 34, 34, 6, 782, 342, 34, 234, 2, 423, 45, 23, 21, 56, 03, 
08, 56, 22, 94, 22.4, 23.1, 40, 45, 242, 475, 21, 24, 23, 423, 444, 24, 75, 
67)

I would like to build a macro that does the following:

   1. Breaks this string values into individual cells (say 1 row X N 
   columns, or 1 column X N rows).
   2. It ask the user to enter the no. of rows (say P) and no. of columns 
   (say Q); and then moves the data into "P" Rows X "Q" Columns.
   3. it should check that N = P X Q (just to confirm that the data will 
   fit into P X Q table).

For E.g. the above e.g. data string has 36 values, the macro should be able 
to covert these into a 1 X 36, 2 X 18, 3 X 12, 4 X 9, 6 X 6, 9 X 4, 12 X 3, 
18 X 2 and 36 X 1 rows and columns, as per the rows & columns desired by 
the user.

I believe this should be doable using a combination of "UBound" and 
"Offset", but I'm just not able to piece together the logic.

Cheers !
Jewel

-- 
Join official Facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.
2) Don't post a question in the thread of another member.
3) Don't post questions regarding breaking or bypassing any security measure.
4) Acknowledge the responses you receive, good or bad.
5) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.

NOTE  : Don't ever post confidential data in a workbook. Forum owners and 
members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups "MS 
EXCEL AND VBA MACROS" group.
To post to this group, send email to excel-macros@googlegroups.com.
To unsubscribe from this group, send email to 
excel-macros+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-macros?hl=en.


Reply via email to