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


Yeh thats how i had it originally withing the array
but i want the values to remain within these cells C11-C15 so when the
macro is run it should only be allowed to run in those cells. Now the
orginial script i had works fine if it start it at Cell C11. But if i
was to start at C12 then the list wouldnt restart from there.

Its abit like the first reply i got, If C15 then I= C11. So it should
start the array within any of these cells, C11, C12, C13, C14, C15 and
once it reachs C15 restart back at C11.


--
Cr4z3
------------------------------------------------------------------------
Cr4z3's Profile: http://www.excelforum.com/member.php...o&userid=14864
View this thread: http://www.excelforum.com/showthread...hreadid=264933

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 690
Default Cell Manipulation

I'm not too sure, but does this idea work?

Sub Demo()
Dim r As Long
Dim n As Variant

n = Array("Bob", "Jim", "Jake", "Andrew", "Kim")

'// You picked a cell in C11:C15 to start
[C14].Select

r = 11 - ActiveCell.Row + 5

[C11] = n((r + 0) Mod 5)
[C12] = n((r + 1) Mod 5)
[C13] = n((r + 2) Mod 5)
[C14] = n((r + 3) Mod 5)
[C15] = n((r + 4) Mod 5)
End Sub

Where C11:C15 now contain the following with "Bob" being in C14.
"Jake", "Andrew", "Kim", "Bob", "Jim"

--
Dana DeLouis
Win XP & Office 2003


"Cr4z3" wrote in message
...

Yeh thats how i had it originally withing the array
but i want the values to remain within these cells C11-C15 so when the
macro is run it should only be allowed to run in those cells. Now the
orginial script i had works fine if it start it at Cell C11. But if i
was to start at C12 then the list wouldnt restart from there.

Its abit like the first reply i got, If C15 then I= C11. So it should
start the array within any of these cells, C11, C12, C13, C14, C15 and
once it reachs C15 restart back at C11.


--
Cr4z3
------------------------------------------------------------------------
Cr4z3's Profile:
http://www.excelforum.com/member.php...o&userid=14864
View this thread: http://www.excelforum.com/showthread...hreadid=264933



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
Cell manipulation with imaging vaughnirv Excel Worksheet Functions 1 November 29th 08 04:24 PM
Cell manipulation with imaging vaughnirv Excel Worksheet Functions 1 November 29th 08 04:18 PM
Need Help with Cell Manipulation gm Excel Discussion (Misc queries) 2 January 21st 06 10:11 AM
Help w/ Cell Manipulation gm Excel Worksheet Functions 0 January 21st 06 02:38 AM
Cell Manipulation Cr4z3 Excel Programming 5 September 30th 04 07:32 AM


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