+ Reply to Thread
Results 1 to 3 of 3

Cell Date / Currency Convert

  1. #1
    Forum Contributor
    Join Date
    11-23-2004
    Location
    Bristol
    MS-Off Ver
    2016
    Posts
    225

    Question Cell Date / Currency Convert

    Hello All, I have a worksheet that in one cell I want either a price or date shown - at present I have a formula that looks within a spreadsheet 2 from either 2 columns - one column is a date formatted and the other column is price formatted - is there a way to have a formula that will change its view automatically to either price or date depending upon which column it looks at.

  2. #2
    JE McGimpsey
    Guest

    Re: Cell Date / Currency Convert

    How should the formula decide which column to look at? Should it look at
    any particular place within the column?

    Perhaps this may give an idea.

    Assume that the dates are in sheet2!A:A and the prices in sheet2!B:B.
    Further assume that Sheet1!A1 will be either 0 or 1. If it's 0, then the
    formula in A2 should return the date from the same row as the calling
    cell, if it's 1, the A2 should return the price.

    Then

    =IF(A1=0,TEXT(Sheet2!A1,"dd mmmm yyyy"), TEXT(Sheet2!B1,"$#,##0.00"))

    or, equivalently

    =OFFSET(Sheet2!$A$1,ROW()-1,A1)




    In article <[email protected]>,
    sparx <[email protected]> wrote:

    > Hello All, I have a worksheet that in one cell I want either a price or
    > date shown - at present I have a formula that looks within a
    > spreadsheet 2 from either 2 columns - one column is a date formatted
    > and the other column is price formatted - is there a way to have a
    > formula that will change its view automatically to either price or date
    > depending upon which column it looks at.


  3. #3
    Forum Contributor
    Join Date
    11-23-2004
    Location
    Bristol
    MS-Off Ver
    2016
    Posts
    225

    Thanks

    Thanks for your help - it works fine - I will use this for certain.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1