Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default Excel VBA Beginners problem

I defined a name for MyTable and NumberRange and use this to countif and
find last drawing.

Sub Upate()
On Error Resume Next
For Each c In Range("NumberRange")
c.Offset(, 1) = Application.CountIf(Range("MyTable"), c)
c.Offset(, 2) = Range("MyTable").Find(c, after:=Sheets("drawing"). _
Range("b2"), lookat:=xlWhole, searchorder:=xlByRows).Row - 2
Next
End Sub
Sub NewRow()
Sheets("drawing").Rows(3).Insert
End Sub

--
Don Guillett
SalesAid Software

"Don Guillett" wrote in message
...
I looked at your workbook. I would
1. sort by last at the top with one intervening row that is hidden,
inserting each time at row 3
2. use a for each macro to find each number from the other page such as

this
example.

Sub findem()
for each c in numberrange
c.offset(,1)=application.CountIf(Range("mt"), c)
c.offset(,2) = Cells.Find(c, after:=Range("a2"), _
lookat:=xlWhole, searchorder:=xlByRows).Row - 2
next
End Sub

--
Don Guillett
SalesAid Software

"knoertje " wrote in message
...
On one sheet I keep track of the lottery numbers every week. On another
sheet I try to keep the statistics of these numbers, like how many
times and how many drawings ago a number ........ The how many times
was no problem, with a COUNTIF....but the how many drawings ago,
doesn't work. I tried an IF (sheet1!A1:A6="number",sheet2!A1+1,
sheet2!=1. But then I get a circular reference statement. How do I
proceed?????


---
Message posted from
http://www.ExcelForum.com/





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
Excel Macro for Beginners Positive Excel Worksheet Functions 5 August 20th 07 07:20 PM
Manual for beginners -- Charts with Excel [email protected] Charts and Charting in Excel 0 November 13th 06 10:01 AM
Excel Macros for Beginners BisyB Excel Discussion (Misc queries) 4 February 2nd 06 04:59 PM
Saving an Excel Spreadsheet with a particular name - Beginners Haldun Alay[_2_] Excel Programming 0 September 1st 03 04:22 PM
Saving an Excel Spreadsheet with a particular name - Beginners Tom Ogilvy Excel Programming 0 September 1st 03 04:18 PM


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