Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default Automatically add a value in a column

I have several big sheets and wants to add automatically a value to the cell
if the neighbourcell has a value.

Example:

A B C D
1 Ohio Mike 78 Man
2 Mona 34 Woman
3 John 43 Man
4 Linn
5 Lisa 44
6
7

This table should automatically - without knowing how many rows that
contains information - be like this:

A B C D
1 Ohio Mike 78 Man
2 Ohio Mona 34 Woman
3 Ohio John 43 Man
4 Ohio Linn
5 Ohio Lisa 44
6
7

Kjell


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 747
Default Automatically add a value in a column

use helping column E

in cell E2 put this formula

=IF(B2="","",IF(A2="",E1,A2))





On Jan 11, 2:24*pm, "Obonden" <kjeblo(ęt)frisurf.no wrote:
I have several big sheets and wants to add automatically a value to the cell
if the neighbourcell has a value.

Example:

* * * A * * * *B * * * * C * * * *D
1 * Ohio * Mike * * 78 * * Man
2 * * * * * * Mona * *34 * * Woman
3 * * * * * * John * * *43 * * Man
4 * * * * * * Linn
5 * * * * * * Lisa * * * 44
6
7

This table should automatically - without knowing how many rows that
contains information - be like this:

* * * A * * * *B * * * * C * * * *D
1 * Ohio * Mike * * 78 * * Man
2 * Ohio * Mona * *34 * * Woman
3 * Ohio * *John * * *43 * * Man
4 * Ohio * *Linn
5 * Ohio * *Lisa * * * 44
6
7

Kjell


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default Automatically add a value in a column

Thanks, but that solution means I have to copy that formula to all cells
down to the last row containing data? How do I copy this formula without
knowing/seeing the data - I want to put this "auto-fill-in-routine" in a
macro. My problem is how to fill (a known) text into column A all the way
down to the last row without knowing how many rows there are in the sheet.

Kjell

"muddan madhu" skrev i melding
...
use helping column E

in cell E2 put this formula

=IF(B2="","",IF(A2="",E1,A2))





On Jan 11, 2:24 pm, "Obonden" <kjeblo(ęt)frisurf.no wrote:
I have several big sheets and wants to add automatically a value to the
cell
if the neighbourcell has a value.

Example:

A B C D
1 Ohio Mike 78 Man
2 Mona 34 Woman
3 John 43 Man
4 Linn
5 Lisa 44
6
7

This table should automatically - without knowing how many rows that
contains information - be like this:

A B C D
1 Ohio Mike 78 Man
2 Ohio Mona 34 Woman
3 Ohio John 43 Man
4 Ohio Linn
5 Ohio Lisa 44
6
7

Kjell



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default Automatically add a value in a column

Double-click on the fill handle in the bottom right-hand corner of the cell,
and it will automatically fill down as far as there is data in the adjacent
column.
--
David Biddulph

Obonden wrote:
Thanks, but that solution means I have to copy that formula to all
cells down to the last row containing data? How do I copy this
formula without knowing/seeing the data - I want to put this
"auto-fill-in-routine" in a macro. My problem is how to fill (a
known) text into column A all the way down to the last row without
knowing how many rows there are in the sheet.
Kjell

"muddan madhu" skrev i melding
...
use helping column E

in cell E2 put this formula

=IF(B2="","",IF(A2="",E1,A2))





On Jan 11, 2:24 pm, "Obonden" <kjeblo(ęt)frisurf.no wrote:
I have several big sheets and wants to add automatically a value to
the cell
if the neighbourcell has a value.

Example:

A B C D
1 Ohio Mike 78 Man
2 Mona 34 Woman
3 John 43 Man
4 Linn
5 Lisa 44
6
7

This table should automatically - without knowing how many rows that
contains information - be like this:

A B C D
1 Ohio Mike 78 Man
2 Ohio Mona 34 Woman
3 Ohio John 43 Man
4 Ohio Linn
5 Ohio Lisa 44
6
7

Kjell



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default Automatically add a value in a column

I knew it was difficult :-)
Thanks a lot!

Kjell


"David Biddulph" <groups [at] biddulph.org.uk skrev i melding
...
Double-click on the fill handle in the bottom right-hand corner of the
cell, and it will automatically fill down as far as there is data in the
adjacent column.
--
David Biddulph

Obonden wrote:
Thanks, but that solution means I have to copy that formula to all
cells down to the last row containing data? How do I copy this
formula without knowing/seeing the data - I want to put this
"auto-fill-in-routine" in a macro. My problem is how to fill (a
known) text into column A all the way down to the last row without
knowing how many rows there are in the sheet.
Kjell

"muddan madhu" skrev i melding
...
use helping column E

in cell E2 put this formula

=IF(B2="","",IF(A2="",E1,A2))





On Jan 11, 2:24 pm, "Obonden" <kjeblo(ęt)frisurf.no wrote:
I have several big sheets and wants to add automatically a value to
the cell
if the neighbourcell has a value.

Example:

A B C D
1 Ohio Mike 78 Man
2 Mona 34 Woman
3 John 43 Man
4 Linn
5 Lisa 44
6
7

This table should automatically - without knowing how many rows that
contains information - be like this:

A B C D
1 Ohio Mike 78 Man
2 Ohio Mona 34 Woman
3 Ohio John 43 Man
4 Ohio Linn
5 Ohio Lisa 44
6
7

Kjell





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
Sort a column automatically Longtime Excel Worksheet Functions 12 March 26th 08 01:30 PM
Automatically inserting a column Tara Excel Worksheet Functions 7 August 18th 06 02:29 PM
how do I get a new row to add to a column automatically? sassecathy New Users to Excel 14 December 14th 05 03:33 AM
How to automatically fill a column? goseespam@lot New Users to Excel 8 August 7th 05 01:01 AM
automatically select last value in a column Jon Horvath Excel Worksheet Functions 2 December 23rd 04 07:47 PM


All times are GMT +1. The time now is 06:53 AM.

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"