Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Ben
 
Posts: n/a
Default Static Cell Refrences in Formulas

I have a formula that is looking at a range of cells on a second worksheet
in a workbook. The cell range is A2:A1000, the formula is looking at the
range, and counting the number of times a certain value appears.

=COUNTIF(Sheet2!A2:A1000,"THING")

There are currently 116 different values in this cell range that I need
statistics on, what I want to do is create one forumla and copy it 115 times
WITHOUT the cell numbers changing in relation to where the formula is
copied. For example, if I copy the formula from A1 to D20 on any given
worksheet, the formula will be changed to:

=COUNTIF(Sheet2!D21:D1019,"THING")

I know that I will have to edit each formula to change the search criteria,
but I don't want to have to spend the time changing the cell numbers on top
of the value to be counted, or creating a formula from scratch for each
value.

Can someone help me?


  #2   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default Static Cell Refrences in Formulas

You can do both.

In A1:An, list your criteria.

In B1, add =COUNTIF(Sheet2!$A$2:$A$1000,$A1)

and copy down


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Ben" wrote in message
...
I have a formula that is looking at a range of cells on a second worksheet
in a workbook. The cell range is A2:A1000, the formula is looking at the
range, and counting the number of times a certain value appears.

=COUNTIF(Sheet2!A2:A1000,"THING")

There are currently 116 different values in this cell range that I need
statistics on, what I want to do is create one forumla and copy it 115

times
WITHOUT the cell numbers changing in relation to where the formula is
copied. For example, if I copy the formula from A1 to D20 on any given
worksheet, the formula will be changed to:

=COUNTIF(Sheet2!D21:D1019,"THING")

I know that I will have to edit each formula to change the search

criteria,
but I don't want to have to spend the time changing the cell numbers on

top
of the value to be counted, or creating a formula from scratch for each
value.

Can someone help me?




  #3   Report Post  
Posted to microsoft.public.excel.misc
Gord Dibben
 
Posts: n/a
Default Static Cell Refrences in Formulas

Ben

=COUNTIF(Sheet2!$A$2:$A$1000,"THING")

Surround the references with the $ signs to lock the column and rows.

A1 is relative
$A1 is column absolute
A$1 is row absolute
$A$1 is row and column absolute

F2 to edit first formula then select the address and hit F4 to toggle through
the options.

Drag/copy that formula down 116 rows.

There may be a way to get the search criteria into each cell without editing
each formula.

Do you have the 116 "Things" in a list somewhere that could be addressed.

i.e. they are in a list in column B from B1:B116

In that case try this =COUNTIF(Sheet2!$A$2:$A$1000,B1)

Drag/copy down 116 rows. B1 will increment to follow your list.


Gord Dibben Excel MVP

On Thu, 15 Dec 2005 17:46:45 -0600, "Ben" wrote:

I have a formula that is looking at a range of cells on a second worksheet
in a workbook. The cell range is A2:A1000, the formula is looking at the
range, and counting the number of times a certain value appears.

=COUNTIF(Sheet2!A2:A1000,"THING")

There are currently 116 different values in this cell range that I need
statistics on, what I want to do is create one forumla and copy it 115 times
WITHOUT the cell numbers changing in relation to where the formula is
copied. For example, if I copy the formula from A1 to D20 on any given
worksheet, the formula will be changed to:

=COUNTIF(Sheet2!D21:D1019,"THING")

I know that I will have to edit each formula to change the search criteria,
but I don't want to have to spend the time changing the cell numbers on top
of the value to be counted, or creating a formula from scratch for each
value.

Can someone help me?

  #4   Report Post  
Posted to microsoft.public.excel.misc
Ben
 
Posts: n/a
Default Static Cell Refrences in Formulas

Thank you for you help!

"Bob Phillips" wrote in message
...
You can do both.

In A1:An, list your criteria.

In B1, add =COUNTIF(Sheet2!$A$2:$A$1000,$A1)

and copy down


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Ben" wrote in message
...
I have a formula that is looking at a range of cells on a second
worksheet
in a workbook. The cell range is A2:A1000, the formula is looking at the
range, and counting the number of times a certain value appears.

=COUNTIF(Sheet2!A2:A1000,"THING")

There are currently 116 different values in this cell range that I need
statistics on, what I want to do is create one forumla and copy it 115

times
WITHOUT the cell numbers changing in relation to where the formula is
copied. For example, if I copy the formula from A1 to D20 on any given
worksheet, the formula will be changed to:

=COUNTIF(Sheet2!D21:D1019,"THING")

I know that I will have to edit each formula to change the search

criteria,
but I don't want to have to spend the time changing the cell numbers on

top
of the value to be counted, or creating a formula from scratch for each
value.

Can someone help me?






  #5   Report Post  
Posted to microsoft.public.excel.misc
Ben
 
Posts: n/a
Default Static Cell Refrences in Formulas

Thank you for your help!

"Gord Dibben" <gorddibbATshawDOTca wrote in message
...
Ben

=COUNTIF(Sheet2!$A$2:$A$1000,"THING")

Surround the references with the $ signs to lock the column and rows.

A1 is relative
$A1 is column absolute
A$1 is row absolute
$A$1 is row and column absolute

F2 to edit first formula then select the address and hit F4 to toggle
through
the options.

Drag/copy that formula down 116 rows.

There may be a way to get the search criteria into each cell without
editing
each formula.

Do you have the 116 "Things" in a list somewhere that could be addressed.

i.e. they are in a list in column B from B1:B116

In that case try this =COUNTIF(Sheet2!$A$2:$A$1000,B1)

Drag/copy down 116 rows. B1 will increment to follow your list.


Gord Dibben Excel MVP

On Thu, 15 Dec 2005 17:46:45 -0600, "Ben" wrote:

I have a formula that is looking at a range of cells on a second worksheet
in a workbook. The cell range is A2:A1000, the formula is looking at the
range, and counting the number of times a certain value appears.

=COUNTIF(Sheet2!A2:A1000,"THING")

There are currently 116 different values in this cell range that I need
statistics on, what I want to do is create one forumla and copy it 115
times
WITHOUT the cell numbers changing in relation to where the formula is
copied. For example, if I copy the formula from A1 to D20 on any given
worksheet, the formula will be changed to:

=COUNTIF(Sheet2!D21:D1019,"THING")

I know that I will have to edit each formula to change the search
criteria,
but I don't want to have to spend the time changing the cell numbers on
top
of the value to be counted, or creating a formula from scratch for each
value.

Can someone help me?



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
Problem with formulas changing cell reference janicesweet Excel Discussion (Misc queries) 1 August 2nd 05 06:23 PM
Copy cell format to cell on another worksht and update automatical kevinm Excel Worksheet Functions 21 May 19th 05 11:07 AM
Combine two formulas in one cell T.R. Excel Discussion (Misc queries) 1 March 9th 05 11:55 PM
How do I protect cell formulas used for daily counts? Pilar Excel Worksheet Functions 0 March 4th 05 11:59 PM
Hyperlinks static but formulas are not. Why? Hari Excel Discussion (Misc queries) 2 January 14th 05 12:35 AM


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