Wrox Programmer Forums
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 19th, 2009, 12:22 PM
Friend of Wrox
 
Join Date: Jan 2006
Posts: 131
Thanks: 10
Thanked 0 Times in 0 Posts
Default Cell formula query

Hi,

I need to build a formula in a column I on Account_Setup worksheet within my workbook.

Firstly, it is based on whether Column H on the same sheet is <> blank "" (if Column H = blank then Column I = 1)
Secondly, if the value of column H is NOT blank, it will match a value found within a table held on a separate sheet (Setup_Tables H5:H54). The formula should return the value held in the adjacent column I from the Setup_Table worksheet).

I think its something like:

Code:
=IF(H7<>"",INDEX(Setup_Tables!H5:H54,MATCH(H7,Setup_Tables!I5:I54,0)),1)
but I'm getting an '#N/A' error.


Any ideas? Hope this makes sense,

Thanks in advance,
__________________
Neal

A Northern Soul

Last edited by Neal; October 19th, 2009 at 12:48 PM..
 
Old October 19th, 2009, 12:53 PM
Friend of Wrox
 
Join Date: Jan 2006
Posts: 131
Thanks: 10
Thanked 0 Times in 0 Posts
Default

I think I've found the answer. It should perhaps be:

Code:
=IF(H7<>"",INDEX(Setup_Tables!I5:I54,MATCH(H7,Setup_Tables!H5:H54,0)),1)
Thanks anyway.
__________________
Neal

A Northern Soul





Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel putting result of a formula in another Cell hakimk Excel VBA 8 July 29th, 2016 12:35 AM
Using Formula on Active Cell manojkumarsoni Excel VBA 3 August 26th, 2007 08:56 AM
What would the formula "=+D4" do in a cell? BrianWren Excel VBA 2 February 2nd, 2006 03:36 AM
Inserting formula into active cell alisonchase Excel VBA 3 March 3rd, 2005 10:06 AM
Cell returns its own formula after a macro! timoma Excel VBA 2 December 19th, 2004 03:48 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.