match characters from different sheet and dirrefernt field with vba - vba

I'm new to this forum and Vba.I have a bank statement to reconcile which is contain few characters on the " detail" field match to my "info" sheet client list. the charges and interest need to find automatically my default nominal list in "info " sheet.id it possible to match with a vba button?please see my attched sample work sheet.
my attchment

Yes, it is possible to "match with a VBA button".

Related

How to get password using combination of other columns?

I need to find or get password from below Excel data based on combination of Fname and Lname. I tried to use Index Match with multiple criteria but it seems to be not working. I need this formula in VBA only, not Excel formulas.
Screenshot below refers.
If you don't have Office 365, then enter formula in first cell (here, D3) and press 'ctrl', 'shift', 'enter'. Otherwise simply enter and press enter (spill effect will take care of rest).
Caveat/disclaimer: FName + SName is relatively 'weak' lookup - given two individuals can have same first and last name, or the 'database' containing all pw's may include names with initials, spelling inconsistency, Title (Mr/Mrs). The solution proposed here does 'light weight' format adjustment (using 'Proper'), if you are convinced/satisfied re: both lists containing consistent formatting, you can drop this component of the equation (i.e. remove Proper and assoc. brackets as req.).
Function
=IFERROR(INDEX($K$3:$K$8,MATCH(PROPER(B3:B8&C3:C8),PROPER(I3:I8&J3:J8),0)),"NOT FOUND!")
Screenshot:
Linked sheet here for your convenience.

How to remove hidden quotes

I've Excel sheet that has few text columns. These text columns are Email Messages. The data from this sheet will be used to send mails.
There data looks fine in Excel but when the message is copied to the Email body quotes are appearing in the beginning and end of the message.
I researched online and found out that these are unwanted characters. I tried removing the " using following formula.
=SUBSTITUTE(SUBSTITUTE(CLEAN(K1),CHAR(127),""),CHAR(160),"")
However the problem is that there are multiple columns with this problem so this method is not very feasible option for me. Also another problem is that after this the cell loses the formatting.
Please help me resolve this, I'm looking for a Find and Replace method if possible. Worst case scenario would be a macro.
Thanks in advance.
Cells.Replace What:=Chr(127), Replacement:=vbNullString
Cells.Replace What:=Chr(160), Replacement:=vbNullString
Your cells in your excel sheet contains multiple lines of data within a data, which means all lines in the cell are entered with carriage return. (Enter Key)
If you copy and paste such cells to a txt file, you will get the text within a " ". The " " are not actually quotes, but text with carriage return.
Just use the formula and let me know if it works,
=SUBSTITUTE(A1,CHAR(10)," ")

Excel VBA comparing longer strings with inconsistency

I have have three excel columns: "description" and "usage" is in sheet 1, "descr and usage" in sheet 2.
Description and usage is combined to one sheet and it is seperated with either a title ("Description:" and "Usage") or with a Entertab.
Description always starts with a small letter (Excel when starting with a name) and description always starts with a capital letter.
Sometimes the description ends with a period and sometimes not.
These columns are part of a very big and old file. Some of the data has been manually inserted when the IT-system was first implemented, this is why there is so many inconsistensy.
Now I want to make an automatically comparison, but I dont know how to handle all the inconsistency, how do I do?
partial code:
s$= cells.value
while right(s,1)=" "
s=left(s,len(s)-1)
wend
s = ucase( left(s,1) ) & right(s,len(s)-1)
cells.value = s

Excel VBA: How to search and copy a value of a certain pattern found within large texts in a column to another column?

As shown in the image above, I need to get the values following a pattern like for example TK AK15590 (TK AK followed by a series of numbers as shown) into cell B2. The same with the rest of the cells in the description column using vba macro in excel. Appreciate if anyone could give me a sample vba code or some information on how I could do this.
VBA is not requiered here. You should use formulas that manipulate text. In this particular case, the following would work:
=IFERROR(MID(A2,FIND("TK AK",A2),FIND(" ",A2,FIND("TK AK",A2)+4)-FIND("TK AK",A2)), "ERROR MESSAGE HERE")
When the length of the string you want to extract is fixed (10 in this case), you could simply use this:
=IFERROR(MID(A2,FIND("TK AK",A2),10), "ERROR MESSAGE HERE")

Excel VBA; Search rows grabbing values and pasting them into another worksheet

I have two workbooks;
(WB1) with two sheets; "Input" and "Output"
and
(MacroWB) with the macro and a "Column Header" list.
Example file: "Messy" sheet = input, "Organized" = output
https://drive.google.com/file/d/0B-leh2Ii2uh9bDBFbDBHbGcxbUU/view?usp=sharing
I need help coding a macro to do the following:
1) Create a loop to go through each row of the "Input" sheet searching for values matching cells in the "Column Header" list.
2) When a matching value is found; take the data from the cell immediately to it's right (in the "Input" sheet) and paste it into the corresponding column of the "Output" worksheet.
3) Once every "Column Header" item has been searched/pasted for that row; move to the next row of the "Input" sheet. Rinse and repeat until all rows of the "Input" sheet have been searched/pasted.
Here is an example, the letters are to be column headers and the numbers are to be copied to the appropriate "Output" sheet column.
https://drive.google.com/file/d/0B-leh2Ii2uh9TXRGTnFDRU1jY0U/view?usp=sharing
Keep in mind that the actual data file has ~50 columns and ~3000 rows.
Also that the data is not all Letter/Numbers like the table above, it is more like the data in the linked .xlsx file.
If there is anything I haven't been clear about, please ask and I will try my best to clarify. Also I may be WAY over thinking this, if so.. please let me know.
THANK YOU ANYONE THAT CAN GET ME GOING IN THE CORRECT DIRECTION!!!
-Joe
Skip the the VBA and use Text to Columns the Data tab. I'malways copying html and its works 99% of the time. If the html is pretty and properly formated you may get away with using the fixed width option, otherwise gor for the delimted and choose "tab". If tab doesn't work try using spaces, assuming that your cells don't contain spaces.
The other option that I've had work on rare occasions that text to columns doesn't is simply saving the text in word and saving as rtf and then opening that in notepad++ (which everyone should have.) Copy from ++ to excel and that usually fixes the problem.
EDIT: If you right click before pasting and click "paste special" this regularly helps with html pasting.
In your sample file, I used the following formula in A2 of Organized sheet (assumed 50 as max columns in Messy):
=IFERROR(OFFSET(Messy!A1,0,MATCH(Organized!A$1,OFFSET(Messy!A1,0,0,1,50), )),"")
Dragging it to H11 produced the following result:
The sample data is not complete, and some 'tags' in Messy sheet are not consistent (SiteID vs SITE_ID), but it should help you get started.