Advancing number within a cell
I have a range of C2:C41. Cell C2 has a letter "X" in it. Cell B8 has a number in it. This number changes at times. I would like to have some vba that would move the letter "X" down the number of cells that is listed in B8.
So here is the tricky part. Since my range ends at C41 and if the "X" is in C40 and the number is 3 in cell B8 then the "X" will move to C3.
Thanks a lot
Keys to the Problem Advancing number within a cell
Download SmartPCFixer to Fix It (Free)
This should be close...
Private Sub Worksheet_Change(ByVal Target As Range)
Dim rngXs As Range
Dim rngXFound As Range
Dim lngOffset As Long
If Intersect(Target, Me.Range("B8")) Is Nothing Then Exit Sub
Set rngXs = Me.Range("C2:C41")
Set rngXFound = rngXs.Find(what:="X", _
LookIn:=xlFormulas, _
MatchCase:=False)
If rngXFound Is Nothing Then Set rngXFound = rngXs.Cells(1)
rngXFound.ClearContents
rngXs.Cells((rngXFound.Row - 1 + Me.Range("B8").Value) Mod rngXs.Cells.Count).Value = "X"
End Sub
Windows Restore
- Click on the Start button on the Taskbar.
- Type "System Restore" (without quotes) in the Search box and hit Enter or,
- Click on System Restore (when you see System Restore pop up in the list of search results).
- Make sure the "Recommended restore" radio button is checked on the restore utility window.
- Click on Next and follow the instructions given.
Note: There is the option on the restore utility to select "Choose a different restore point". Unless you have a specific reason to select a different date and time than what Windows recommends, just select the recommended option stated in the steps above. If you choose to select another one, follow these steps:
Click on that desired date and time, and Windows 7 will perform a scan for any affected programs in that restore point.Once completed, click Next and follow the instructions given.
Once you have selected the restore point, your system will start the restoring process, after which you will have to restart the system.
Another Safe way to Fix the Problem: Advancing number within a cell:
How to Fix Advancing number within a cell with SmartPCFixer?
1. You can Download SmartPCFixer here. Install it on your system. When you open SmartPCFixer, it will perform a scan.
2. After the scan is finished, you can see the errors and problems need to be repaired. Click Fix All.
3. The Fixing part is finished, the speed of your computer will be much higher than before and the errors have been fixed.
Related: How to Fix - 64g ssd with a 500g regular drive?,Allow Unhide Rows in Protected Workbook [Solved],[Solved] Get in Excel 2007 data from Access 2007 out of self-built Queries,[Solution] How can I temporarily disable 'service manager' to install Adobe flashplayer?,[Anwsered] When I try to watch a flash video, I am told occasionally that I don't have Adobe Flash.,Solution to Error: Black screen during boot sequence,[Solved] Can't restore Windows 7 64-bit from external hard drive,How to Fix - IE 11 Enhance Protect Mode reset issue with add-on's?,Solution to Error: Internet Explorer 9 update/install error - Error Code 80092004,Upgrading to IE 8 causes cookies to get deleted when starting IE [Anwsered],Solution to Problem: All programs try to start from windows component
,Troubleshoot:External Hard Drive not listed in Windows 7 backup wizard Error
,How to Fix Error - Getting an error "not connected to the internet" while trying to install Samsung Kies?
,How to Fix - Internet Explorer shuts down and reopens tab when attaching to email or uploading files.?
,Fast Solution to Problem: Sending Error Message
,[Anwsered] Thinkpad 8611 Boot,How to Resolve - Svchost Helper?,Fast Solution to Problem: L30 101 Driver Windows 7,Troubleshooter of Error: Io Device,How to Fix Error - Dell Laptop Code 39?
Read More: After hibernation or at start up, all applications take time to respond. Tech Support,Troubleshooting:After auto sleep shutdown, computer won't start back up Error,[Anwsered] Adobe reader icon has taken over all my programs,How to Fix Problem - Adobe Flash Player10 ActiveX & Java 6 Update 18 installed, but not showing in PROGRAMS, not opening up songs, and just not working.?,after couple days shutting down fails to connect to bt hub [Anwsered],a file called mDNSResponse.exe. is causing bonjour not to operate properly,what should I do?,A QUESTION USING THE "IF'S" Formula.,A continuos flashing window with which title is C:Windows\System32\cmd.exe, and has the following message: The syntax of the command is incorrect.,Acrobat compatibility issue and you tube problems____,ActiveX on IE 9 not loaded
No comments:
Post a Comment