Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default Row ID generation

I want to create macro that would Enter ID number in column A if value is
entered in column B. For example i have following

How do i execution of code if any value is entered in certain column' cell ?
For example i want to enter value in column A if ANY value is entered in
column B

Example:
A B C
1 1 aaa
2 2 bbb
3

I want to create code that would enter next number in column A if i enter
any value in column B.
Value A2+1 should be entered in cell B3 if i enter value "s" in cell B3.
Like this

A B C
1 1 aaa
2 2 bbb
3 3 s
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 86
Default Row ID generation

You need two different codes.
Formula for cell A1
Another formula for all the other cells in column A

in A1 put =IF(B1="","",1)
in A2 put =IF(B2="","",A1+1)

Then copy A2 all the way down
--
Gary's Student


"Mikus" wrote:

I want to create macro that would Enter ID number in column A if value is
entered in column B. For example i have following

How do i execution of code if any value is entered in certain column' cell ?
For example i want to enter value in column A if ANY value is entered in
column B

Example:
A B C
1 1 aaa
2 2 bbb
3

I want to create code that would enter next number in column A if i enter
any value in column B.
Value A2+1 should be entered in cell B3 if i enter value "s" in cell B3.
Like this

A B C
1 1 aaa
2 2 bbb
3 3 s

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default Row ID generation

Thanks garry ... i can't understand why i did not come up with this myself :)

I think i will use ISBLANK(B1) instead of B1="" though

"Gary's Student" wrote:

You need two different codes.
Formula for cell A1
Another formula for all the other cells in column A

in A1 put =IF(B1="","",1)
in A2 put =IF(B2="","",A1+1)

Then copy A2 all the way down
--
Gary's Student


"Mikus" wrote:

I want to create macro that would Enter ID number in column A if value is
entered in column B. For example i have following

How do i execution of code if any value is entered in certain column' cell ?
For example i want to enter value in column A if ANY value is entered in
column B

Example:
A B C
1 1 aaa
2 2 bbb
3

I want to create code that would enter next number in column A if i enter
any value in column B.
Value A2+1 should be entered in cell B3 if i enter value "s" in cell B3.
Like this

A B C
1 1 aaa
2 2 bbb
3 3 s

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
PostScript generation in c# Ravi Excel Worksheet Functions 0 November 30th 07 05:15 AM
Date Generation Amanda Excel Worksheet Functions 4 June 4th 07 09:25 PM
Key Generation Sri Excel Discussion (Misc queries) 1 March 9th 07 03:53 PM
email generation Mir Khan Excel Discussion (Misc queries) 1 September 23rd 05 09:10 PM
Report Generation Alan[_18_] Excel Programming 1 November 19th 03 01:46 AM


All times are GMT +1. The time now is 11:40 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"