#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 23
Default VLOOKUP Macro?

Clarification to the statement below: "I'm concerned about someone
accidently overwriting my formula but
because they need to be able to manually type in the other item totals, I
can't protect it."

This is why my formula is in column L rather than directly in column J.

"blucajun" wrote:

I'm not sure what to use to get this result but here's what I'm trying to do:

My column L is a Total column that contains this formula (starting in L6):

=IF(C6="Mileage", 'Mileage Personal Auto'!$G$56,IF(C6="Bus. Meals & Ent.",
'Business Meals & Entertainment'!$G$56, ""))

Each cell in column C contains a dropdown field that could be any number of
choices.

Basically, my forumla says to look at cell C6 and if it says either
"Mileage" or "Business Meals & Entertainment", then go look at either the
"Mileage" or "Business Meals & Entertainment" worksheets (depending on which
it found) and copy the value from that worksheet's cell G56. Unfortunately,
for those line items that don't show Mileage or Business Meals &
Entertainment in column C, the user will have to manually type in a total in
column H. I'm concerned about someone accidently overwriting my formula but
because they need to be able to manually type in the other item totals, I
can't protect it.


I'm at the point of trying to figure out how to get this end result without
having to include a formula in column H:

If Cell L6 = any value, then copy that value to cell H6. If L6 does not
contain any value, then leave cell H6 empty.

Then I can hide column L, and I don't have to protect column H. I'm not
much familiar with VLOOKUP and Macros but I've been reading through this site
for something similar and I think this may be the way to go, even though I
don't know how to do it. Thanks in advance for your help!


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro - Vlookup orquidea Excel Discussion (Misc queries) 6 May 14th 08 04:42 PM
Vlookup Macro Joey Excel Discussion (Misc queries) 0 April 11th 08 02:36 AM
Vlookup Macro? ctwobits Excel Discussion (Misc queries) 0 December 6th 07 09:42 PM
vlookup macro MikeD1224 New Users to Excel 1 June 16th 07 04:37 AM
VLOOKUP in a macro?? chip_pyp Excel Discussion (Misc queries) 1 March 27th 06 09:40 PM


All times are GMT +1. The time now is 11:02 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"