Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 117
Default Doing a 'countif' but I just want the value not the formula

Hi There, can anybody help me with this one please:
I am no programmer but the macro below sticks a countif
formula in each cell as requested, but this makes the wb
slow to update (as it calcs of each cell) is there anyway
I can change it so it calcs the countif but just places the
amount it counts in each cell instead of the formulae?
Thanks for any help
seeya ste

Public Sub howmany()
Dim xlrow As Long

thedata = "DV3:EJ65000"
xlrow = 2150

Do While Not ActiveSheet.Cells(xlrow, 70).Value = ""

ActiveSheet.Cells(xlrow, 73).Formula = "=countif(" & thedata & ", " &
ActiveSheet.Cells(xlrow, 70).Value & ")"

xlrow = xlrow + 1
Application.StatusBar = xlrow
Loop
Application.StatusBar = False
End Sub
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Doing a 'countif' but I just want the value not the formula

Hi
after the line
ActiveSheet.Cells(xlrow, 73).Formula = "=countif(" & thedata & ", " &
ActiveSheet.Cells(xlrow, 70).Value & ")"

add the line
ActiveSheet.Cells(xlrow, 73).value=ActiveSheet.Cells(xlrow, 73).value

--
Regards
Frank Kabel
Frankfurt, Germany

"ste mac" schrieb im Newsbeitrag
om...
Hi There, can anybody help me with this one please:
I am no programmer but the macro below sticks a countif
formula in each cell as requested, but this makes the wb
slow to update (as it calcs of each cell) is there anyway
I can change it so it calcs the countif but just places the
amount it counts in each cell instead of the formulae?
Thanks for any help
seeya ste

Public Sub howmany()
Dim xlrow As Long

thedata = "DV3:EJ65000"
xlrow = 2150

Do While Not ActiveSheet.Cells(xlrow, 70).Value = ""

ActiveSheet.Cells(xlrow, 73).Formula = "=countif(" & thedata & ", " &
ActiveSheet.Cells(xlrow, 70).Value & ")"

xlrow = xlrow + 1
Application.StatusBar = xlrow
Loop
Application.StatusBar = False
End Sub


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Doing a 'countif' but I just want the value not the formula

or even

ActiveSheet.Cells(xlrow, 73).Value = Application.CountIf(Range(theData),
ActiveSheet.Cells(xlrow, 70).Value)

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Frank Kabel" wrote in message
...
Hi
after the line
ActiveSheet.Cells(xlrow, 73).Formula = "=countif(" & thedata & ", " &
ActiveSheet.Cells(xlrow, 70).Value & ")"

add the line
ActiveSheet.Cells(xlrow, 73).value=ActiveSheet.Cells(xlrow, 73).value

--
Regards
Frank Kabel
Frankfurt, Germany

"ste mac" schrieb im Newsbeitrag
om...
Hi There, can anybody help me with this one please:
I am no programmer but the macro below sticks a countif
formula in each cell as requested, but this makes the wb
slow to update (as it calcs of each cell) is there anyway
I can change it so it calcs the countif but just places the
amount it counts in each cell instead of the formulae?
Thanks for any help
seeya ste

Public Sub howmany()
Dim xlrow As Long

thedata = "DV3:EJ65000"
xlrow = 2150

Do While Not ActiveSheet.Cells(xlrow, 70).Value = ""

ActiveSheet.Cells(xlrow, 73).Formula = "=countif(" & thedata & ", " &
ActiveSheet.Cells(xlrow, 70).Value & ")"

xlrow = xlrow + 1
Application.StatusBar = xlrow
Loop
Application.StatusBar = False
End Sub




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 117
Default Doing a 'countif' but I just want the value not the formula

Frank, Bob, thankyou very much...

seeya ste
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
COUNTIF FORMULA ISSUES - NEED FORMULA CORRECTED Debbi Excel Worksheet Functions 2 November 18th 09 04:47 AM
Countif formula Zak Excel Discussion (Misc queries) 7 January 11th 08 04:03 PM
CountIf formula results in the formula itself being displayed. NewKid Excel Worksheet Functions 9 December 21st 05 11:10 PM
Countif formula and then some... Julie Excel Worksheet Functions 6 July 27th 05 08:13 PM
COUNTIF FORMULA Paul Bird Excel Programming 4 July 14th 03 09:14 PM


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