#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
CJRolls
 
Posts: n/a
Default cell "if"

Hello, I need to have excel fill a cell only if there is a value in the cell
to the right. I.e Column A1 increases by 1 whenever I enter a value in column
B2 and so on down the sheet. Thanks
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max
 
Posts: n/a
Default cell "if"

"CJRolls" wrote:
Hello, I need to have excel fill a cell only
if there is a value in the cell
to the right. I.e Column A1 increases by 1
whenever I enter a value in column
B2 and so on down the sheet. Thanks


One guess ..

Assuming B1 contains a label,
put in A1: =IF(COUNTA(B:B)=1,"",COUNTA(B:B)-1)
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
CJRolls
 
Posts: n/a
Default cell "if"

Thanks Max but I can only show a value in column A if there is a value in
column B. I enter information in to column B and need a formula to fill down
in column B that counts the lines as information is entered into B. Many
thanks.

A B
1 1 25623
2 2 214
3 3 587455
4

"Max" wrote:

"CJRolls" wrote:
Hello, I need to have excel fill a cell only
if there is a value in the cell
to the right. I.e Column A1 increases by 1
whenever I enter a value in column
B2 and so on down the sheet. Thanks


One guess ..

Assuming B1 contains a label,
put in A1: =IF(COUNTA(B:B)=1,"",COUNTA(B:B)-1)
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
daddylonglegs
 
Posts: n/a
Default cell "if"


Try this formula in A1 copied down

=IF(B1,COUNT(B$1:B1),"")

if column B just contains numbers, if possibly text

=IF(LEN(B1),COUNTA(B$1:B1),"")


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=513069

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max
 
Posts: n/a
Default cell "if"

CJRolls:

Believe you've changed your specs in your response <g

Couldn't help but feel that what you're looking for
is a simple auto-row numbering in col A
which appears "blank" until something is entered in col B

In which case, think we could also place in A1:
=IF(B1="","",ROWS($A$1:A1))
and copy A1 down as far as required

--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max
 
Posts: n/a
Default cell "if"

In which case, think we could also place in A1:
=IF(B1="","",ROWS($A$1:A1))
and copy A1 down as far as required


The above presumes data in col B will be entered sequentially down the col
w/o skips (as per post). If there's the possibility of skips, go with
daddylonglegs's suggestions. And if you were to insert new rows in-between
subsequently,
just re-fill the formula in col A from the top cell.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---



  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 70
Default cell "if"

I'm using this formula to count my records =IF(LEN(B1),COUNTA(B$1:B1),"")
Is there a way to add letters to the count. I want it to count like this in
the spreadsheet.

ALE1
ALE2
ALE3
ALE4
ALE5...

"daddylonglegs" wrote:


Try this formula in A1 copied down

=IF(B1,COUNT(B$1:B1),"")

if column B just contains numbers, if possibly text

=IF(LEN(B1),COUNTA(B$1:B1),"")


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=513069


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
Instead of a negative number, I'd like to show zero... Dr. Darrell Excel Worksheet Functions 6 December 7th 05 08:21 PM
Transfer Cell Formatting for linked cells Scott Excel Discussion (Misc queries) 2 November 23rd 05 11:04 PM
Cell color based upon cell value My View Excel Discussion (Misc queries) 11 July 6th 05 03:59 AM
cell color index comparison MINAL ZUNKE New Users to Excel 1 June 30th 05 07:11 AM
VLookup resulting in a blank cell... KempensBoerke Excel Worksheet Functions 1 October 28th 04 09:57 PM


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

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

About Us

"It's about Microsoft Excel"