Posts

Showing posts with the label Excel

How to create a CSV file from MySQL with PHP?

Create a CSV file from MySQL with PHP simple copy and paste this code to create the csv file from mysql with php and change the query according to your need. <?php mysql_connect('host','username','password'); mysql_select_db('database_name'); function remove_char($var) { $set = preg_replace('/[^a-zA-Z0-9-+@() \.\_\']/','padh',trim($var)); return $set; } function csv_create() { header("Content-type: application/csv"); header("Content-Disposition: attachment; filename=".date('Y-m-d-h:i:s').".csv"); header("Pragma: no-cache"); header("Expires: 0"); $res = mysql_query("SELECT fname,lname,fullname,email FROM cs_users order by id"); echo "First Name,Last Name,Full Name,Email\n"; // fetch a row and write the column names out to the file while($val = mysql_fetch_array($res)) { $fname = remove_char($val['fname']); $lna

how to get middle value from a string in excel or find value between two character or word?

IF you want to get middle value from a string in excel or find value between two character or word? Let ... If the value is  32000=1=10.44|32000=12=7.64|3200 and you want to get "10.44" value It is little bit long way but you can get exact result... First you should use =MID(A1,2,2)     This formula it will return you a string like =MID(A1,9,10) where 9 is the value where you want to start to select value and 10 is that how much character you want to put It will return something like this "10.44|3200" Now you  in other colon use this code for last result =LEFT(B1,FIND("|",B1,1)-1) Use this formula it will return you your value which you want to get like: 10.44

How Do I Determine If A Value In One Column Exists In Another Column? - Excel

How Do I Determine If A Value In One Column Exists In Another Column ? - Excel If you want to know that the value of first column exist in second column in  excel so So place at first column which data you want to check and place in second column which will you compare first column data. Now paste this code in  3rd colum.... =IF(ISNA(VLOOKUP(A1,$B$1:$B$600,1,FALSE)),"","Yes") Simply paste this code and if exist so it will return yes in front of that column.... 

How to get a string in excel with only first letter is capital and rest of string in small letter?

This code will give the right string in excel . In string First letter will be capital letter and rest of string will be in small letter. try this really works..... = UPPER (LEFT(A1,1))&LOWER(RIGHT(A1,LEN(A1)-1))