Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-30-2015, 06:18 AM
CSSH CSSH is offline Using data from one row in another row Windows 8 Using data from one row in another row Office 2013
Novice
Using data from one row in another row
 
Join Date: Mar 2015
Posts: 1
CSSH is on a distinguished road
Default Using data from one row in another row

In the "field part" of the Gantt Chart, is it possible to let the value of a custom field depend on the value of a field in a different row? As far as I can tell it is only possible to create functions that, so to speak, operate within each row (i.e. task) individually. Is that really the case?
Reply With Quote
  #2  
Old 03-30-2015, 01:02 PM
jjmclell jjmclell is offline Using data from one row in another row Windows 7 32bit Using data from one row in another row Office 2010 32bit
Advanced Beginner
 
Join Date: Nov 2012
Location: Sault Ste. Marie, Canada
Posts: 52
jjmclell is on a distinguished road
Default

You might be able to write a macro in VBA that sets a text field to equal the value in a particular field for a different task.

For example, I think you can work with the Tasks collection object (basically the list of all your tasks) to return a field property for a particular Task object and then assign that property to the text field of another Task object.

I'm rusty with my VBA or I'd try to write a quick macro up for you... If I find time, I'll try to write one and respond if no one else has.
Reply With Quote
  #3  
Old 03-30-2015, 01:23 PM
jjmclell jjmclell is offline Using data from one row in another row Windows 7 32bit Using data from one row in another row Office 2010 32bit
Advanced Beginner
 
Join Date: Nov 2012
Location: Sault Ste. Marie, Canada
Posts: 52
jjmclell is on a distinguished road
Default

Here's a quick macro I wrote that sets the value of the Text1 field for any given task to the value in the Name field for the preceding task (ignoring the first task that has no preceding task). Very simple, but you can see how this sort of thing is possible. You can then just assign the macro to a button and click it anytime you want to update...

Code:
Sub setFieldText()
    Dim temp As Long
    For temp = 2 To ActiveProject.Tasks.Count
        ActiveProject.Tasks(temp).Text1 = ActiveProject.Tasks(temp - 1).Name
    Next temp
End Sub
Attached Images
File Type: png settextfieldmacro.PNG (13.9 KB, 10 views)
Reply With Quote
  #4  
Old 03-30-2015, 04:06 PM
JulieS JulieS is offline Using data from one row in another row Windows 7 64bit Using data from one row in another row Office 2013
Expert
 
Join Date: Dec 2011
Location: New England
Posts: 1,693
JulieS will become famous soon enough
Default

Formulas in custom fields only refer to the current record (task)
Reply With Quote
Reply

Tags
field, function

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Retrieving data from data base based on text selection capitala PowerPoint 0 12-10-2014 08:10 AM
How to replicate, consolidate and count cell data in excel for data consoldation. Loran Excel 7 06-05-2014 01:07 AM
How to populate cells in Sheet2 with Data Source query using cell data from Sheet1 bobznkazoo Excel 2 03-27-2014 11:14 AM
Edit Data Source- Linking template charts to new data lbf PowerPoint 0 10-28-2011 12:19 PM
Powerpoint: adding data to trend lines w/o data labels HaiLe PowerPoint 0 04-11-2011 09:21 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:02 AM.


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