View Single Post
 
Old 05-03-2012, 06:04 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi cjaye,

Automating the whole process with vba is quite straightforward, even if new vehicles need to be catered for. Testing whether a given vehicle is listed on the 'Mileage History' sheet and adding a new column for that vehicle isn't at all difficult; neither is adding a new row for each month. Likewise, catering for a new vehicle on the 'Main' sheet appears to require nothing more complicated than copying columns A:G down one line - even if the addition of the new vehicle on the 'Mileage History' sheet entails inserting the new vehicle's column between a pair of the existing ones. That's a benefit of the formulae I've used on the 'Main' sheet.

Without knowing more about the format of the data you're processing, there's a limit to how much I can help you with the coding. As I said, though, it's all quite straightforward. See attached. The 'Demo' macro inserts some data for new & existing vehicles, then updates the main sheet's layout to reflect the new vehicle data.
Attached Files
File Type: xls cjaye.xls (68.5 KB, 12 views)
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote