+ Reply to Thread
Results 1 to 2 of 2

LEFT formula results of a Formula?

  1. #1
    Registered User
    Join Date
    03-11-2004
    Location
    Denver, CO
    Posts
    19

    LEFT formula results of a Formula?

    I hope I can explain what I am trying to do: I want to have a formula in cell A1 that looks at cell B1 and if B1 has a formula (starts with a =) then do one thing. If B1 is a number then do something else?

    =IF(LEFT(B1, 1)="=","",WEEKDAY(C1))

    The problem is my formula is only giving me the LEFT(B1,1) results of the cell rather than the results of the formula that is in B1. If the formula in B1 is =C1+D1 and the results of C1+D1 = 100, it is giving me 1 the left digit of 100 rather than = the left part of the formula...

    Do you understand what I am trying to do?

    Thanks for your help.

    MD

  2. #2
    Forum Contributor
    Join Date
    01-11-2004
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    388
    Hi!

    AFAIK the worksheet functions will not let you read the bits of your formula.
    But VBA will.
    For example

    Sub check()
    For i = 1 To 10
    If Cells(i, 6).HasFormula = True Then Cells(i, 7) = "#"
    Next
    End Sub

    will check cells 1 to 10 in col F and put a # in col G if there is a formula in that row in col F.

    Any use?

    Alf

+ 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