Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Blacnk Cells in Excel

I have a document that looks like this?


Table of students who have chosen physics as a primary choice 1.

ID Primary Choice Secondary Choice Programs
515 1 2 math
3 english
6 spanish


I am trying to create a pivot table that breaks out the primary choice
(first column), them the primary choice(second column) and then progrm
name - the count will be on student ID.

As it is, I first have to fill down the records so that I end up with
this:
ID Primary Choice Secondary Choice Programs
515 1 2 math
515 1 3 english
515 1 6 spanish

Then create the pivot table.

The file has about 10000 student IDs and this is very time consuming,
is there a better way to do this?

Thanks

  #2   Report Post  
Posted to microsoft.public.excel.programming
Jay Jay is offline
external usenet poster
 
Posts: 671
Default Blacnk Cells in Excel

Hi KW -

Here is a "gap-filling" procedure that has been posted in this Discussion
Group before. Copy it to a standard module, select your Primary Choice
column, and run the procedure.

Sub fill_in_the_blanks()
Dim r As Range
For Each r In Selection
If IsEmpty(r.Value) Then
r.Value = r.Offset(-1, 0).Value
End If
Next
End Sub

--
Jay


"KW" wrote:

I have a document that looks like this?


Table of students who have chosen physics as a primary choice 1.

ID Primary Choice Secondary Choice Programs
515 1 2 math
3 english
6 spanish


I am trying to create a pivot table that breaks out the primary choice
(first column), them the primary choice(second column) and then progrm
name - the count will be on student ID.

As it is, I first have to fill down the records so that I end up with
this:
ID Primary Choice Secondary Choice Programs
515 1 2 math
515 1 3 english
515 1 6 spanish

Then create the pivot table.

The file has about 10000 student IDs and this is very time consuming,
is there a better way to do this?

Thanks


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel: match two cells in one sheet to two cells in another and return a third cells value Spence Excel Worksheet Functions 3 February 13th 11 05:33 AM
Can I connect Excel cells to cells in an embedded Word table? PBJ Excel Discussion (Misc queries) 0 August 8th 07 08:24 PM
How can I have formatting options like merge cells ,Bold,active for the unlocked cells of the protected worksheet.Is it possible in excel? divya Excel Programming 2 July 20th 06 02:04 PM
conditional formating cells i Excel based on other cells values Elias Petursson Excel Worksheet Functions 3 May 23rd 06 06:45 PM
Pasting single cells from Word to multiple cells in Excel ASBiss Excel Worksheet Functions 1 February 15th 05 11:47 AM


All times are GMT +1. The time now is 08:19 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"