Results 1 to 4 of 4
  1. #1
    4 Star Lounger
    Join Date
    Aug 2001
    Location
    London, UK
    Posts
    516
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Query formulae help wanted (Office 2000)

    Hi guys,
    How can I do the following on a query?
    If the currency (tccy) is equal to GBP then move the decimal point two places to the left.
    For example if the price is 752 and the currency is GBP then the price becomes 7.52.
    Can anyone help me with the formulae??

  2. #2
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Query formulae help wanted (Office 2000)

    Hi,
    Use something like:
    iif([tccy]="GBP",[price]/100,[price])
    Hope that helps.
    Regards,
    Rory

    Microsoft MVP - Excel

  3. #3
    Star Lounger
    Join Date
    Nov 2001
    Posts
    75
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Query formulae help wanted (Office 2000)

    Add a new column to the query and put this in the top line:

    NewPrice: IIf([tccy]="GBF",[Price]*0.01,[Price])

    This will work to display the 752 as 7.52 but will not change the 752 that is stored in the table.

    hth,
    Jack

  4. #4
    4 Star Lounger
    Join Date
    Aug 2001
    Location
    London, UK
    Posts
    516
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Query formulae help wanted (Office 2000)

    Thank you Rory & Jack.
    The formulae works well.
    Thanx again.
    <img src=/S/bow.gif border=0 alt=bow width=15 height=15> <img src=/S/kiss.gif border=0 alt=kiss width=34 height=15> <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •