Consulting

Results 1 to 2 of 2

Thread: Find column header

  1. #1
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,058
    Location

    Find column header

    I am trying to find the column header of a cell which matches a particular value, however the formula that I'm using in Cell T2 is returning a "Value" error. Could someone show me where I am going wrong please?

    Cell S2 is the value to match within the range B2:R2 and I'm expecting the T2 formula to return the value "Grenville"
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

  2. #2
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,058
    Location
    Never mind. I was using a formula
    =Index($B$1:$S$1,,Sumproduct(($B3:$S3=T3)*Column($B3:$S3)-Column($A3) and have changed that to
    =Index(B$1:$S$1,,Match(T3,$B3:$S3,0)) which works.
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

Posting Permissions

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