Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 07-16-2014, 04:44 AM
BobBridges's Avatar
BobBridges BobBridges is offline Populate Cells with info contained in other cells Windows 7 64bit Populate Cells with info contained in other cells Office 2010 32bit
Expert
 
Join Date: May 2013
Location: USA
Posts: 700
BobBridges has a spectacular aura aboutBobBridges has a spectacular aura about
Default

I'm not sure from what you wrote whether you know this already, but the most obvious way to save a value and use it later is to set a variable of your own, perhaps like this:
Code:
For jr = 2 To rz
  Select Case ows.Cells(jr, 7).Value
    Case "Phase"
    Case "Sub-Phase"
      col4 = ows.Cells(jr, 4).Value
    Case Else
      ows.Cells(jr, 3).Value = col4
    End Select
  Next jr
The name of the variable is pretty much up to you; there are certain values VBA won't let you use (you can look them up if you want) but mostly you can pick any name that makes sense to you.

"Group!" (he says thoughtfully); I didn't think of applying that here. (Pause to think about it a while.) But no, the problem with grouping is that what you really want is to copy the Sub-Phase value in D to the lower level in a new column; grouping won't help you with that. Interesting thought, though; I'll have to keep it in mind for other tasks where it might not ordinarily have occurred to me.
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Populate Cells with info contained in other cells Can I pre-populate cells with a formula? Box Excel 1 05-03-2014 11:55 PM
How to populate cells in Sheet2 with Data Source query using cell data from Sheet1 bobznkazoo Excel 2 03-27-2014 11:14 AM
Populate Cells with info contained in other cells How-TO format cells (FILL) by comparing cells zanat0s Excel 1 07-03-2012 04:27 AM
Count range cells eliminating merge cells danbenedek Excel 0 06-15-2010 12:40 AM
Populate cells in Word from a database hotlilshan Word 3 12-09-2008 01:51 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:18 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft