Automatically populate values into 2 columns

pbabu2404

New Member
Joined
Oct 11, 2013
Messages
2
Hi All,

am quite new to VBA program so kindly help me with macro which should populate given values into particular columns till end of the sheet/work book.

input and output excel files are as follows here for your understanding purpose.
9th row
name </SPAN>

class</SPAN>

date
Rose</SPAN>
Nally</SPAN>
Vanny</SPAN>
a</SPAN>
b</SPAN>
c</SPAN>
d</SPAN>
b</SPAN>
e</SPAN>
f</SPAN>
g</SPAN>
h</SPAN>
j

</SPAN>
NAME</SPAN>class</SPAN>date</SPAN>
Rose</SPAN>1234</SPAN>01/09/2014</SPAN>
Nally</SPAN>1234</SPAN>01/09/2014</SPAN>
Vanny</SPAN>1234</SPAN>01/09/2014</SPAN>
a</SPAN>1234</SPAN>01/09/2014</SPAN>
b</SPAN>1234</SPAN>01/09/2014</SPAN>
c</SPAN>1234</SPAN>01/09/2014</SPAN>
d</SPAN>1234</SPAN>01/09/2014</SPAN>
b</SPAN>1234</SPAN>01/09/2014</SPAN>
e</SPAN>1234</SPAN>01/09/2014</SPAN>
f</SPAN>1234</SPAN>01/09/2014</SPAN>
g</SPAN>1234</SPAN>01/09/2014</SPAN>
h</SPAN>1234</SPAN>01/09/2014</SPAN>
j</SPAN>1234</SPAN>01/09/2014</SPAN>

<TBODY>
</TBODY><COLGROUP><COL><COL><COL></COLGROUP>

<TBODY>
</TBODY><COLGROUP><COL><COL><COL></COLGROUP>
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
it is not clear what you want as all 13 people are in class 1234 date = 1/9/14

Oops :) sorry for the below example.
I wanted to print two values (1234,01/09/2014) under 2nd and 3rd columns in the complete excel sheet where ever it finds the first column data as mentioned in the second table below.
Hope this clear to you !
 
Upvote 0
so to be clear, if you enter Rose you want class and date to be populated automatically ? (from the data in your table which is presumably every pupil)
 
Upvote 0

Forum statistics

Threads
1,214,918
Messages
6,122,246
Members
449,075
Latest member
staticfluids

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