Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Simon
 
Posts: n/a
Default changing values in a Word Table

I need to read through a word document (Table)
The table has merged cells for Heading

Part No Description Price
====================
Widgets
A12344 Widget 1 £ 5.99
WA123 Widget 2 £ 6.45

Thinggies
D555 Thinggy 1 £ 12.67
RT6161 Thinngy 2 £ 17.50

I need to produce a Trade Price List
so say I deduct 20% from each value

Can't seem to get the VALUE into a a NUMBER format !!!

Sub Trade()
'
' Calculate Trade Price List
'
Application.ScreenUpdating = False
Dim x As Integer
Dim LastRow As Long 'get used LASTROW
LastRow = ActiveDocument.Tables(1).Rows.Count

For x = 1 To 5 'LastRow
Dim Price As Variant
Dim Trade As Variant
Price = Selection.Tables(1).Rows(x).Cells(3)
Retail = Val(Price) * (1-0.2)
MsgBox (Price & Trade)
Next x

End Sub


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
pivot table with selection values not included in the base data confused Charts and Charting in Excel 0 June 21st 05 02:42 PM
Pivot Tables, Help? Adam Excel Discussion (Misc queries) 6 March 24th 05 02:35 PM
Pivot Table with Zero Values for Month wyman Charts and Charting in Excel 1 January 14th 05 05:59 PM
Bar graph values keep changing Mike82j2000 Charts and Charting in Excel 1 January 6th 05 01:27 PM
changing proportion of chart and data table Dawn Parks Charts and Charting in Excel 3 January 6th 05 01:18 AM


All times are GMT +1. The time now is 09:19 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"