ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   VLOOKUP Macro? (https://www.excelbanter.com/excel-worksheet-functions/192965-re-vlookup-macro.html)

blucajun

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!




All times are GMT +1. The time now is 06:29 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com