Filling in the blanks

shanzel

Board Regular
Joined
Nov 13, 2004
Messages
63
I have a spread sheet that has SSN and Student courses in the next column, I need it to fill in the ssn for each course.

SSN Course

111111111 ARTS1111
111111111 ARCH1111
111111111 MUSC1111
111111111 MATH1111
222222222 BIOL1111
HIST1111
SOCG1111
AGRI1111
COMP1111
333333333 SOWK1111
RDNG1111
POLC1111

Is there a formula and/or a macro that looks for a blank and fills it in with what is available from above?
 
If the first row with data is in A1 you type =A1.

If it's a different row then type =AX, where X is the first row with data.

Another way to do it is to either type = in the formula bar, then press the Up arrow.
 
Upvote 0

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Shanzel

I, too am a little confused as to what you are after. I set up a sheet with the information you provide and hopefully the layout is close(columns are generic and can be changed for your sheet)

I tried Norie's suggestion and it filled in every blank with what is in cell "A3". I assumed that A2 was your first blank cell.
I tried your "Goto" and it only filled in one row (a2),

This is how I setup the sheet based on what was given:
Book1
ABCD
1SSNCourse
2
3111111111ARTS1111
4111111111ARCH1111
5111111111MUSC1111
6111111111MATH1111
7222222222BIOL1111
8HIST1111
9SOCG1111
10AGRI1111
11COMP1111
12333333333SOWK1111
13RDNG1111
14POLC1111
Sheet1


And this is how the sheet looks after running Norie's suggestion:
Book1
ABCD
1SSNCourse
2111111111
3111111111ARTS1111
4111111111ARCH1111
5111111111MUSC1111
6111111111MATH1111
7222222222BIOL1111
8333333333HIST1111
9333333333SOCG1111
10333333333AGRI1111
11333333333COMP1111
12333333333SOWK1111
130RDNG1111
140POLC1111
Sheet1


I did not do the last step (paste special...values) as suggested so you can see the outcome (formulas) in the previous blank cells.

Now for further discussion on what you are actually after.

That person may be taking five courses and the ssn is only listed once, and the next person maybe taking only two courses etc.

That is not the case with you sample data. Person 1 seems to be taking 4 courses and his SSN is listed 4 times. Persons 2 & 3 seem to be taking 1 course each, SSN listed once.

EDIT: So if person 1 is taking 5 courses and Person 2 is taking 2 couses, how do we know which couses that will be?

I need the blanks ssn filled in so I can run another report on this.

I think this statement is the most confusing.

I'm assuming that your Course column repeats the available courses (you need more than 1 student in ARTS1111, right)

So whith what is provided, it is hard to tell who (or what) should be in your "blank" courses.

I think with a little more info and a sample of your sheet(sensitve data masked) using the HTML maker, and what results you need, I'm sure something can be done.

h.h.
 
Upvote 0
If the first row with data is in A1 you type =A1.

If it's a different row then type =AX, where X is the first row with data.


Not exactly. Should be the cell immediately above the first blank cell.
 
Upvote 0
Boiler

Which is what I really meant, but perhaps didn't explain too well.:oops:
 
Upvote 0
Okay, did it again with refence to cell above blank.
Book1
ABCD
1SSNCourse
2SSN
3111111111ARTS1111
4111111111ARCH1111
5111111111MUSC1111
6111111111MATH1111
7222222222BIOL1111
8222222222HIST1111
9222222222SOCG1111
10222222222AGRI1111
11222222222COMP1111
12333333333SOWK1111
13333333333RDNG1111
14333333333POLC1111
Sheet1


But the question to the OP is, does Person 2 belong in the couses that now has his SSN in column A? Same for Person 3.

h.h.
 
Upvote 0

Similar threads

Forum statistics

Threads
1,215,044
Messages
6,122,827
Members
449,096
Latest member
Erald

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