0

I have two worksheets in excel.

  1. First Worksheet has User vs Transaction Code.

  2. Second Worksheet has User vs Module

The Result I want is :

What User has what transaction code and module.

How do I write a macro so I can get to know which user is in which module and has what transaction code.

If anyone could help that will be great.

Community
  • 1
  • 1

1 Answers1

0

i think vlookup is one of the possible solutions to your question.

read the following and then try to it. http://www.techonthenet.com/excel/formulas/vlookup.php http://office.microsoft.com/en-in/excel-help/vlookup-HP005209335.aspx

ok i think since your new to this, ill explain as much as i can from the basics. first the syntax,

VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])

lookup_value The value to search in the first column of the table or range. The lookup_value argument can be a value or a reference.

table_array The range of cells that contains the data. You can use a reference to a range (for example, A2:D8), or a range name. The values in the first column of table_array are the values searched by lookup_value.

col_index_num The column number in the table_array argument from which the matching value must be returned. A col_index_num argument of 1 returns the value in the first column in table_array; a col_index_num of 2 returns the value in the second column in table_array, and so on.

range_lookup true or false depending on whether you want an exact or a close match

example

mathew
  • 97
  • 3
  • 14
  • https://www.dropbox.com/s/7wvly7ma9gy38mu/1.png This is a snapshot of excel file. I want to get the result that user 1 is available in md1,md2,md3,md4.Is this possible? – user2531308 Jul 02 '13 at 10:00
  • of course it is,specify that in the table array. srry mate i am currently busy on a project of my own otherwise i would have whipped up a code for you. try using excels built in macro recorder to and do what your are trying to do> if you still dont get it, ill help you out – mathew Jul 02 '13 at 10:06
  • of course mate... can u attach two sample workbooks and an explanation of what you exactly need? i shall have a look and provide you a solution. i thought u had given up... – mathew Jul 23 '13 at 09:33
  • https://docs.google.com/file/d/0B19_35dV1ylpZG9RT3ZTQzFRYTQ/edit?usp=sharing This is a sample excel sheet .. There is sheet 3 and sheet 4 which are given to me and i need a result sheet by a macro or v look up. I have tried a lot of things but couldnt get it done . it would be great if you could help me. Please ask me if you dont understand anything on the sheet. – user2531308 Jul 23 '13 at 09:44
  • Basically in one sheet i have risk id which have two transaction codes and a risk assigned to it. eg: b001 risk has t1,t2 transation codes and risk is high. then in the second sheet i have which users have which t codes eg: user 1 may have t1 t2 t3 transaction code. in the result i need one user has how many risks. In this example which is above i know user 1 has 1 risk b001 because user 1 has t1 t2 which lead to risk b001. – user2531308 Jul 23 '13 at 09:49
  • hello again upload a file in excel use this if it is ok with you or put one in your question http://wikisend.com/ – mathew Jul 23 '13 at 14:48
  • is this excel sheet fine for you? – user2531308 Jul 26 '13 at 05:45
  • yea dude, its fine, but im struggling with it... hold on ill try something – mathew Jul 26 '13 at 14:24