Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Make counter invisible

I have the following code: (It was given by two previous respondents) I
works great!

But If I change my value From "PACK" to some other string like "ABC
can I hide the counter?
Thanks!

Dim i As Integer
Dim L As Integer

i = 0
For Each CELL In Range("A1:DD267")
If CELL.Value = "PACK" Then
i = i + 1
For j = 0 To 7
CELL.Offset(0, j).Value = "PACK" & CStr(i)
Next j
If i 40 Then i = 0
End If
Next CEL

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Make counter invisible

What exactly do you mean by hide the counter?

--

HTH

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

"hotherps " wrote in message
...
I have the following code: (It was given by two previous respondents) It
works great!

But If I change my value From "PACK" to some other string like "ABC"
can I hide the counter?
Thanks!

Dim i As Integer
Dim L As Integer

i = 0
For Each CELL In Range("A1:DD267")
If CELL.Value = "PACK" Then
i = i + 1
For j = 0 To 7
CELL.Offset(0, j).Value = "PACK" & CStr(i)
Next j
If i 40 Then i = 0
End If
Next CELL


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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Make counter invisible

Re-reading your previous post, I guess you mean that you don't want ABC1,
ABc2, etc. you just want ABC. Correct?

If so, it is simply

Dim i As Integer
Dim L As Integer

i = 0
For Each CELL In Range("A1:DD267")
If CELL.Value = "ABC" Then
i = i + 1
For j = 0 To 7
CELL.Offset(0, j).Value = "ABC"
Next j
If i 40 Then i = 0
End If
Next CELL

Gets over the problem of a repeated number in a column<vbg


--

HTH

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

"hotherps " wrote in message
...
I have the following code: (It was given by two previous respondents) It
works great!

But If I change my value From "PACK" to some other string like "ABC"
can I hide the counter?
Thanks!

Dim i As Integer
Dim L As Integer

i = 0
For Each CELL In Range("A1:DD267")
If CELL.Value = "PACK" Then
i = i + 1
For j = 0 To 7
CELL.Offset(0, j).Value = "PACK" & CStr(i)
Next j
If i 40 Then i = 0
End If
Next CELL


---
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
How to make hidden sheet invisible LLee2 New Users to Excel 9 April 8th 07 06:58 AM
How to run macros and make the workbooks invisible christine Excel Programming 6 January 9th 04 04:26 AM
thanks TOM. How to run macros and make the workbooks invisible christine Excel Programming 3 January 5th 04 12:59 PM
How to make the Toolbar Invisible through VBA Atif Akbar[_2_] Excel Programming 2 December 11th 03 06:55 AM
Make one column Invisible. Neeraja Excel Programming 5 September 29th 03 02:58 AM


All times are GMT +1. The time now is 11:49 AM.

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"