Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Big Idea lacking enough knowledge

Hi
I want to be able to count the rows that have data on one sheet
"S1" (A2:BX2) and use that amount to enter a formula on another sheet
"S2" in starting form A6 and then remove the rows that the formula
equals "0". Any ideas

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 220
Default Big Idea lacking enough knowledge

Try something like this:

Sub test()
Set rng1 = Sheets("S1").Range("A2:BX2")
For Each cell In rng1
If cell.Value 0 Then
count = count + 1
End If
Next cell
Set rng2 = Sheets("S2").Range("A6:A100")
rng2.Formula = "=countif($B:$B, " & count & ")"
End Sub

--
Dan

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Big Idea lacking enough knowledge

On Jul 18, 12:59 am, "Dan R." wrote:
Try something like this:

Sub test()
Set rng1 = Sheets("S1").Range("A2:BX2")
For Each cell In rng1
If cell.Value 0 Then
count = count + 1
End If
Next cell
Set rng2 = Sheets("S2").Range("A6:A100")
rng2.Formula = "=countif($B:$B, " & count & ")"
End Sub

--
Dan


Thanks Dan Works a Treat!!!
How can i get the lines that return "0" now from the formula to
disappear ?

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
YOU WANT KNOWLEDGE AS WELL AS END ONLY 4,- EUR OVER 400,000 EURS BECOMING? raypayette[_4_] Excel Programming 0 June 19th 06 01:11 PM
Nice idea lack of knowledge! carnelain Excel Discussion (Misc queries) 3 March 21st 06 07:40 PM
Lacking in Macro Building Skill... ChasePenelli Excel Programming 2 June 25th 05 04:33 AM
Knowledge from this forum Nigel Excel Programming 0 May 5th 05 11:20 AM
Where does the knowledge come from? Wazooli Excel Programming 2 February 16th 05 06:57 PM


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

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"