Please help!

hultgrenrn

New Member
Joined
Jan 3, 2012
Messages
5
I am looking to write a macro which will write information from 7 columns of information into a new spreadsheet. For example, my data is:
Col A Col B Col C Col D Col E Col F Col G
Name1 Measure 1 Length 1 Width 1 Height 1 Diameter 1 Radius1
Name 2 Measure 2 Length 2 Width 2 Height 2 Diameter 2 Radius 2
Width 3 Height 3 Diameter 3
Height 4 Diameter 4
Ht 5
Ht 6




WHat I want this macro to do is write them like such:
Name1 Measure1 Length1 Width1 Height1 Diameter1 Radius1
Name1 Measure1 Length1 Width1 Height1 Diameter1 Radius2
Name1 Measure1 Length1 Width1 Height1 Diameter2 Radius1
Name1 Measure1 Length1 Width1 Height1 Diameter2 Radius2

I need it to move from Right to Left, changing one column at a time. Once Radius' two unique values have been expressed, it moves to diameter and expresses the next value with each of the radius values expressed, and so on, looping and changing the values so that all combinations of the variables are written.
(I hope this request makes sense!)
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
I have 7 columns of data, on a seperate sheet, I need to put cells A1, B1, C1, D1, E1 F1 and G1. In row 2 I need to put A1-F1 and G2. On the Third Row (since there is no G3), I need to put A1-E1, then F2, then G1. The fourth Row needs to be A1-E1, F2 then G2. I need to repeat the pattern, moving from Right to left replacing down each column, once that column is empty, I need to move Left, and repeat the pattern until I have every combination of the values in each column. (hope this helps)
 
Upvote 0
I'm still struggling to see how your sample output relates to your sample input. The spaces have disappeared and some data is missing. Also it's hard to tell what's in what column in your sample input. Try surrounding it with borders before copying and pasting into a reply.
 
Upvote 0
Input
Name1 Measure1 Length1 Width1 Height1 Diameter1 Radius1
Name2 Measure2 Length2 Width2 Height2 Diameter2 Radius2
Name3 Measure3 Length3 Width3 Height3 Diameter3
Name4 Measure4 Length4 Width4 Height4 Diameter4

Output
Name1 Measure1 Length1 Width1 Height1 Diameter1 Radius1
Name1 Measure1 Length1 Width1 Height1 Diameter1 Radius2
Name1 Measure1 Length1 Width1 Height1 Diameter2 Radius1
Name1 Measure1 Length1 Width1 Height1 Diameter2 Radius2
Name1 Measure1 Length1 Width1 Height1 Diameter3 Radius1
Name1 Measure1 Length1 Width1 Height1 Diameter3 Radius2
Name1 Measure1 Length1 Width1 Height1 Diameter4 Radius1
Name1 Measure1 Length1 Width1 Height1 Diameter4 Radius2
Name1 Measure1 Length1 Width1 Height2 Diameter1 Radius1
Name1 Measure1 Length1 Width1 Height2 Diameter1 Radius2
Name1 Measure1 Length1 Width1 Height2 Diameter2 Radius1
Name1 Measure1 Length1 Width1 Height2 Diameter2 Radius2
Name1 Measure1 Length1 Width1 Height2 Diameter3 Radius1
Name1 Measure1 Length1 Width1 Height2 Diameter3 Radius2
Name1 Measure1 Length1 Width1 Height2 Diameter4 Radius1
Name1 Measure1 Length1 Width1 Height2 Diameter4 Radius2


and so on...the next would look similar with Height 3, then Height 4
then all of those would repeat with Width 2 etc.
 
Upvote 0
A1 B1 C1

I want to know the formula when i write number/amount in cell "A1" and keep "B1" empty then "C1" should be "NO" and when i write number/amount in "A1" and "B1" then "C1" should be "YES"... PLEASE TELL ME THE FORMULA WHICH I SHOULD ENTER IN C1..
 
Upvote 0
There is no formula, per se, it just writes the values in the cells. I will write a simpler version, I think I am confusing you with so many variables.

Input:

Able 10 cm 50 cm
Baker 11 cm 55cm
Charlie 12 cm <no measurement>
Davis 13 cm <no measurement>

Output:
Able 10 cm 50cm
Able 10 cm 55cm
Able 11 cm 50cm
Able 11 cm 55cm
Able 12cm 50cm
Able 12 cm 55cm
Able 13 cm 50cm
Able 13 cm 55cm
Baker 10 cm 50cm
Baker 10 cm 55cm
Baker 11 cm 50cm
Baker 11 cm 55cm
Baker 12cm 50cm
Baker 12 cm 55cm
Baker 13 cm 50cm
Baker 13 cm 55cm
Charlie 10 cm 50cm
Charlie 10 cm 55cm
Charlie 11 cm 50cm
Charlie 11 cm 55cm
Charlie 12cm 50cm
Charlie 12 cm 55cm
Charlie 13 cm 50cm
Charlie 13 cm 55cm
Davis 10 cm 50cm
Davis 10 cm 55cm
Davis 11 cm 50cm
Davis 11 cm 55cm
Davis 12cm 50cm
Davis 12 cm 55cm
Davis 13 cm 50cm
Davis 13 cm 55cm
 
Upvote 0
Spikesguy
It might be better if you start a new thread, as your problem does not relate to this one.
 
Upvote 0

Forum statistics

Threads
1,214,998
Messages
6,122,639
Members
449,093
Latest member
Ahmad123098

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