Technology Get the latest on technology, electronics and software…

another excel question

Thread Tools
 
Old Feb 8, 2007 | 10:53 AM
  #1  
AQUI NO!'s Avatar
Thread Starter
It's not over yet
 
Joined: Nov 2002
Posts: 3,000
Likes: 0
From: Socal
another excel question

I exported a report i'm working with and i'm trying to analyze the data within it, but i'm having problems because only the first entry for any one week has the date on it. so i'm having to manually add the week number to the data, is there any formula that can fill the blanks.

also could i suggest starting a thread that contains your most useful excel formulas? lots of smart people here.

original chart

transaction week# units shipped
1 week 23 x1
2 x 2
3 x3
4 x400

how i want it

1 week23 x1
2 week23 x2
3 week23 x3
4 week23 x400

Last edited by AQUI NO!; Feb 8, 2007 at 10:56 AM.
Reply
Old Feb 8, 2007 | 11:00 AM
  #2  
AQUI NO!'s Avatar
Thread Starter
It's not over yet
 
Joined: Nov 2002
Posts: 3,000
Likes: 0
From: Socal
better visual
ransaction week# units shipped
1.....................week 23......... x1
2 .......................................... x 2
3........................................... x3
4............................................x400
5.....................week24...........y1
6............................................y2
how i want it

1............week23......x1
2............week23......x2
3............week23......x3
4...........week24.........y1
5...........week24.........y2
etc
Reply
Old Feb 8, 2007 | 11:05 AM
  #3  
GIBSON6594's Avatar
My Garage
 
Joined: Nov 2004
Posts: 13,386
Likes: 11
From: NY
Not trying to be a smartass, but can't you just copy paste all the rows with the proper week?
Reply
Old Feb 8, 2007 | 11:06 AM
  #4  
ViperrepiV's Avatar
sup
 
Joined: Jan 2004
Posts: 2,147
Likes: 1
From: NYC
you can do a find and replace maybe. Find "x" replace with "week 23.....x"
Reply
Old Feb 8, 2007 | 11:09 AM
  #5  
AQUI NO!'s Avatar
Thread Starter
It's not over yet
 
Joined: Nov 2002
Posts: 3,000
Likes: 0
From: Socal
Originally Posted by ViperrepiV
you can do a find and replace maybe. Find "x" replace with "week 23.....x"
i know, that's how i'm currently doing it, but the spread sheets have over 1500 rows and cover a whole years so it's kinda tedious to find and replace or paste and copy 52 times.
Reply
Old Feb 8, 2007 | 12:47 PM
  #6  
03typeS6spd's Avatar
misanthropist
 
Joined: Aug 2003
Posts: 1,666
Likes: 0
From: Tyson's Corner
find and replace all?

Single click, doesn't get much easier
Reply
Old Feb 8, 2007 | 01:21 PM
  #7  
AQUI NO!'s Avatar
Thread Starter
It's not over yet
 
Joined: Nov 2002
Posts: 3,000
Likes: 0
From: Socal
Originally Posted by 03typeS6spd
find and replace all?

Single click, doesn't get much easier
I don't think i made myself clear, there are about 1500 transactions per week on the spread sheet, and there are 52 weeks in a year, however, the spreadsheet only has one date entry per week, and everything below it is blank until the next week, like this.

week 1
blank
blank
blank
etc
week 2
blank
blank
blank
etc
week 3
blank
blank
week 4
etc

I'm looking for a way to rpl the blanks with the week number corresponding to it. Right now i'm copying the week, selecting the blank space between weeks and copying, however i have to carry out this transaction 52 times per spreadsheet and i'm thinking someone here has got to have a better way of doing it.
Reply
Old Feb 8, 2007 | 01:59 PM
  #8  
Dan Martin's Avatar
Photography Nerd
 
Joined: Sep 2003
Posts: 21,489
Likes: 11
From: Toronto
Originally Posted by AQUI NO!
I don't think i made myself clear, there are about 1500 transactions per week on the spread sheet, and there are 52 weeks in a year, however, the spreadsheet only has one date entry per week, and everything below it is blank until the next week, like this.

week 1
blank
blank
blank
etc
week 2
blank
blank
blank
etc
week 3
blank
blank
week 4
etc

I'm looking for a way to rpl the blanks with the week number corresponding to it. Right now i'm copying the week, selecting the blank space between weeks and copying, however i have to carry out this transaction 52 times per spreadsheet and i'm thinking someone here has got to have a better way of doing it.
Here's how I would do it:
1) create a new column
2) in that column, create a formula in each cell referring to the cell above it. For example, if column you created was Column D, and you were were in row 4, put "=D3" in that cell. This will copy the contents of the cell above it. Fill this formula all the way down your sheet for as many rows as you have.
3) right-click on the column header of the column that contains your weeks and copy everything.
4) right-click on the column that you created and select "Paste Special"
5) from the paste special menu, select "All" in the top section and place a checkmark next to "Skip Blanks" at the bottom.

Voila!
Reply
Old Feb 8, 2007 | 03:10 PM
  #9  
Kikaida's Avatar
Burning Brakes
 
Joined: Jun 2006
Posts: 1,204
Likes: 0
From: Hawaii
Originally Posted by Dan Martin
Here's how I would do it:
1) create a new column
2) in that column, create a formula in each cell referring to the cell above it. For example, if column you created was Column D, and you were were in row 4, put "=D3" in that cell. This will copy the contents of the cell above it. Fill this formula all the way down your sheet for as many rows as you have.
3) right-click on the column header of the column that contains your weeks and copy everything.
4) right-click on the column that you created and select "Paste Special"
5) from the paste special menu, select "All" in the top section and place a checkmark next to "Skip Blanks" at the bottom.

Voila!
Good idea!

Also, if you want the contents of the new column to be the text (or number) instead of the formula (ie: the contents in the cell being "Week23" instead of "=D4", you can:

6) right-click on the column header of the new column with the formulas and click "Copy".
7) right-click on the column header again and click "Paste Special"
8) from the paste special menu, select "Values" and click "OK".

Voila!
Reply
Old Feb 8, 2007 | 04:40 PM
  #10  
AQUI NO!'s Avatar
Thread Starter
It's not over yet
 
Joined: Nov 2002
Posts: 3,000
Likes: 0
From: Socal
sweet i'll give it a try.
Reply
Old Feb 9, 2007 | 10:23 PM
  #11  
kona's Avatar
Racer
20 Year Member
 
Joined: Nov 2003
Posts: 376
Likes: 0
From: Pasadena, CA
Another alternative is to create a macro.
Sub Macro1()
Dim cell As Range
Dim x As String
Col = ActiveCell.Column
Row = ActiveCell.Row
For Each cell In Range(Cells(Row, Col), Cells(65536, Col + 1).End(xlUp))
If cell.Value = vbEmpty Then
cell.Value = x
Else
Row = cell.Row
x = Cells(Row, Col).Value
End If
Next
End Sub

Just click on the cell where you want to start (probably A1) and then run this macro.
Reply
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
navtool.com
3G MDX (2014-2020)
32
Jan 20, 2016 11:43 AM
navtool.com
5G TLX Audio, Bluetooth, Electronics & Navigation
31
Nov 16, 2015 08:30 PM
navtool.com
1G RDX Audio, Bluetooth, Electronics & Navigation
1
Sep 25, 2015 05:15 PM
rboller
3G TL Audio, Bluetooth, Electronics & Navigation
0
Sep 23, 2015 02:49 PM




All times are GMT -5. The time now is 10:50 AM.