Macro To Automatically Convert PrtScr Image Based Text To Real Text In Cell

Mar 22, 2014

Programming Excel VBA Macro to do OCR (text recognition) from a prt scr screen capture image and input the text into cells. Currently my Excel file has a push-button, and upon clicking on it the macro pastes into Excel the current clipboard image I have created by pressing prt scr while in another program. The macro then crops the image to the region with the applicable text. I have to then manually type the text I see in image format into the appropriate cells.

the VBA coding to automate this? I'd like it to use the clipboard image and run it through OneNote OCR, after which the applicable text values are automatically entered into the cells. Ideally the code will first crop to the region with the desired text before it does OCR. If this is not feasible, it will need to incorporate a method (keyword search?) to hone in on the desired text after the entire prt scr image has been OCRed.

View 8 Replies


ADVERTISEMENT

Automatically Call Macro Based On Changed Cell Address & Text

Apr 13, 2009

I have the following code pasted into the worksheet module which used to work fine but no longer does. I didn't touch the code, it just stopped working.


Private Sub WorkSheet_Change(ByVal Target As Range)
Select Case Target.Address
Case "$A$16"
Select Case Target
Case "Custom Color 1": Call CustomColorInput1
Case "Custom Color 2": Call CustomColorInput1
Case "Custom Color 3": Call CustomColorInput1
Case "Custom Color 4": Call CustomColorInput1
Case Else:
End Select
Case "$A$17"
Select Case Target
Case "Custom Color 1": Call CustomColorInput2
Case "Custom Color 2": Call CustomColorInput2
Case "Custom Color 3": Call CustomColorInput2
Case "Custom Color 4": Call CustomColorInput2
Case Else:
End Select
Case "$A$18"

CustomColorInput 1-6 are the same except they input data into different cells F16-F21.

When I attach any of the CustomColorInput macros to a button it works fine. When I try to call it from the worksheet module, the data input box pops up but the data doesn't get entered into the cell. When I try to step through the CustomColorInput macros using F8, the input box pops up, I enter data and press ok. Then I continue with F8 and the debugger jumps to a custom function that I entered (below), which is not called for and is in no way related to the code.

Function PullAfterLast(rCell As Range, strLast As String)
PullAfterLast = Mid(rCell, InStrRev(rCell, strLast) + 1, 256)
End Function

When I close VBA, the data that I typed into the data input box is in the correct cell.

So basically, I'm getting three different responses from the offending code depending on how I call it up. Can anyone tell me what's going on?

More generally, in this and previous occasions, I've had problems with macros that cease to work for no reason that is apparent to me. What are some things that would cause a macro to stop working, without actually changing the code (other than the obvious, like referring to names or worksheets etc. that don't exist anymore)?

View 9 Replies View Related

Automatically Convert Text Files To CSV

Aug 24, 2006

I have a lot of .txt files that needed to be converted to .csv file format. Right now I am doing it manually using MS Excel i.e. File > Open. For each file, I need to specify the length of each fields one by one, so it is quite an effort for me.

Is there any way to automate this process using MS Excel or any other existing programs?

View 3 Replies View Related

Macro To Edit A Cell & Convert Formula To Text

Oct 13, 2006

Have a macro that copies a formula from each of 100 workbooks to a new workbook. I want to display these formulas as text and want a macro or someway to display these cells as text. I have tried to record a macro that presses the F2 key, the home key and the apostrophe. This works for the one cell but provides the following macro that does not work for anyother cell.

ActiveCell.FormulaR1C1 = _
"'=VLOOKUP($A$30,'G:Variance Reports FY07[Salary Dist Var Repts_Cur Mth.xls]end of July'!$E$76:$G$200,3)"
Range("B3").Select

View 2 Replies View Related

Convert Array Into Text And Remove Duplicate Entries From Text In Cell?

Jun 12, 2014

I have the following two columns, and would like to obtain for each individual Company, the corresponding Country values excluding duplicates as text in a single cell.

Company 2Country B
Company 2Country C
Company 3Country C
Company 3Country C
Company 5Country A
Company 5Country C
Company 5Country C

For example:
- For Company 2, a cell containing "Country B, Country C"
- For Company 3, a cell containing "Country C"
- For Company 5, a cell containing "Country A, Country C"

I've approached generating an array using an IF statement, as in =IF(INDEX(A1:A8="Company 5",,),INDEX(B1:B8,,)," "), which returns the following array: ={" ";" ";" ";" ";" ";" ";" ";"Country A";"Country C";"Country C";" ";" ";" ";" "}.

The question is: how do I get that array to produce, as text in a cell: "Country A, Country C". Note that the duplicate Country C has been removed.

There are a few "StringConcat" User-defined functions that I've found elsewhere on the internet, but they don't seem to be able to handle to conditionally generated IF Index array, which I would think is key to parsing between Countries corresponding to each Company in the list.

View 3 Replies View Related

Automatically Hide/Unhide Columns Based On Cell Text

Jan 10, 2009

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column <> 13 Then Exit Sub
If InStr(Target.Value, "Other (specify in next column)") Then
Columns("N").Hidden = False
ElseIf WorksheetFunction. CountIf(Columns("M"), "Other (specify in next column)") = 0 Then
Columns("N").Hidden = True
End If
End Sub

but I have a lot of columns that I need to perform as above and I have put the code together as below

Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next

If Target.Column = 13 And InStr(Target.Value, "Other (specify in next column)") Then
Columns("N").Hidden = False
ElseIf WorksheetFunction.CountIf(Columns("M"), "Other (specify in next column)") = 0 Then.................

Using the above code, when I selected more than one cell anywhere in my workbook and pressed delete I was bugging out with a runtime error 13 message. You can see from the above code that I inserted "On Error Resume Next" - this got rid of the runtime error 13 message, but now when I select more than one cell and press delete, hidden columns are incorrectly revealed in my worksheet. how I can extend the working code at the top of this posting so that it works for a number of different columns in my Worksheet i.e. without the runtime error 13 occurring and without columns being incorrectly revealed.

View 8 Replies View Related

Calling An Image Alt Text For Use In A Macro?

Aug 19, 2009

I'm hoping there is some way to call whatever text is stored in the "alt text" field of images placed in an excel sheet for use as a variable / string reference in a macro.

The "alt text" will not be changed in any way by the macro.

View 10 Replies View Related

Automatically Select Item From Dropdown List Based On Cell Text

Apr 8, 2013

I have a spreadsheet where user can search for information inside a search box and the appropriate rows are returned using formulas.

I have a drop down list (Category: Model) in the search box as well as a search field (Category: Program, cell D2). Underneath the search box, search rows are returned with column categories: Program, Model, etc.

What I require is that if a user enters the specific program into the search field D2, then the dropdown list would automatically choose which model that program belongs to based on the returned row.

For example, if I typed "engine" into D2 and pressed enter,

Under the records section (Row 14 and beyond), the following record will pop up:

Program
Model
Indicators

Engine
F-16
3a

Based on the record, F-16 would be chosen from the dropdown list. Is there any way this can be done?

View 6 Replies View Related

How To Automatically Identify Image Name And Place In Cell Next To Image

Jan 22, 2014

I am looking for a way to take the picture name associated with an image ie: (picture 571) and place that picture name in the cell next to the image.

I can see the picture name - it registers in the top left box that usually indicates the cell the cursor is on... and I could manually type that name next to each image.

However my spreadsheet has several thousand rows- each with several columns of information and an image..

I am looking for a way "formula?" to automatically read the image in cell J4 and populate cell K4 with the image name... and so on.

The reason for my request... is I am importing products into a web based shopping cart... to do so I have to export the products to a csv and import that csv into the shopping cart. The process of exporting to a csv- strips away all the images and leaves just data.

I found that I can save the document as an html and that process creates a folder with all the images- saved as (picture 571.jpg) if the resulting csv had the image name... the shopping cart would then look for that image name in my image file and it would populate into the shopping cart appropriately.

This seemed on it's face like a really simple thing to do, I have plenty experience with excel & I thought I'd be able to make cell k4= j4 and tada it would glean the image name & I could simply copy that formula all the way down the sheet & it would be done... but I just cant find the magic button that freely gives up the image name...

View 5 Replies View Related

Automatically Enter Text In Cell Based On Another Cell?

Jul 29, 2013

I am trying to enter a value in a cell which is dependent on a corresponding value in a table. I have a table A which has a cab type and a corresponding cab number.

What I want to achieve is that when I enter the cab number in another table say in cell (D3), the cab type is automatically entered in cell (C3).

Table A
Cab Type
Cab No

Indigo
100

Indigo
758

Innova
1544

Indica
1675

View 1 Replies View Related

Automatically Enter Text In Cell Based On Another Cell

Jul 28, 2013

I am trying to enter a value in a cell which is dependent on a corresponding value in a table. I have a table A which has a cab type and a corresponding cab number. What I want to achieve is that when I enter the cab number in another table say in cell (D3), the cab type is automatically entered in cell (C3).

Table A
Cab Type
Cab No

[Code].....

View 7 Replies View Related

Convert Date & Time As Text To Real Date & Time

Apr 22, 2008

I have 04/02/08 12:00:01 AM (mm/dd/yy hh:mm:ss AM/PM) in text format in a cell. I need to convert this to date/time custom format as given above so that I can make comparisons with NOW() output.

View 2 Replies View Related

Image Is Hyperlinked To A Cell With Specific Text Entered

Mar 18, 2008

Is there any way I can make it so an image is hyperlinked to a cell with specific text entered. After clicking on the image, the cell where the image is hyperlinked to changes text.

For example:

An image of a strawberry is hyperlinked to a cell which contains the word "strawberry".
After clicking on the strawberry image, the cell which contained the word "strawberry" now contains the word "strawberry1".

If you understand that, I would so love the help.

I also posted this is question here

http://www.excelforum.com/showthread.php?t=637811

View 11 Replies View Related

Excel 2003 :: Printing - Text Box And Image Print Cell Data Doesn't?

Aug 30, 2013

She has a spreadsheet created in Excel 2003 (she is still using 2003) which contains an image with a textbox in the top left corner then all other cells contain data.

When user prints this spreadsheet all that prints is the image and the textbox.

I have cleared the print area reset the print area removed the picture (prints only the text box)

and none of these changes have changed what prints.

I have checked all printer setting and these appear normal.

previously user could print this spreadsheet fine and all other worksheets in the workbook print fine as well.

other users are still able to print to the same printer correctly from this spreadsheet.

View 2 Replies View Related

Excel 2010 :: Convert Formulas To Corresponding Text Based On ID

Jul 22, 2014

I have an excel file with 2 sheets. Sheet 1 has a column that contains formulas (ie (18299*11151)/20067 ) Those numbers are IDs referencing questions stored in Sheet 2. What I would like to do is find a way to look up those questions and place them into the formula instead of the ID numbers.

View 6 Replies View Related

Automatic Update Of Cell Text Based On Item Number (also Text)?

Mar 28, 2014

I have a column C with different text in cells (item's title). Column D - relevant description for each of the items. 100+ rows.

Now, unfortunately, often a spreadsheet with items is updated with many new items. So I get a new spreadsheet with old and new items mixed. I need, somehow, to import descriptions of the old items (Column D of the old spreadsheet) to the new spreadsheet from old spreadsheet. So I want excel to look for old items in column A of the new spreadsheet and, once found, insert a description in the column B from old spreadsheet.

See attachment : Example for forum.xlsx

View 3 Replies View Related

Search Cell For Text String And Paste Text In Based On Finding?

Jun 29, 2014

I need to create a macro to do the following:

Search the activecell for a text string (a), and then either paste in text string (b) at the end of the cell if (a) is found, or text string (c) if (a) is not found.

For example, if the activecell has "AA/" in it, I want the cell to become "AA/01" (pasting in "01" at the end), and if the cell has just "AA" in it, I want it to still become "AA/01" (pasting "/01" at the end). The macro will be linked to a commandbutton.

View 7 Replies View Related

A Macro To Convert All Such Text To Numbers?

Feb 26, 2014

I am extracting a large set of numbers forming various tables from SAP. These numbers are not recognized as numbers and have Formula error. Only way to further process them is to convert them to number using 'Error Checking' option from 'Formula' Tab.

I need a macro to convert all such text to numbers, note there are no other formula errors.

I have other macro to delete rows, columns, take sum and create new Summary Table from the data but that does not work until I manually convert text to numbers.

how to have the macro globally i.e, I need to only open the extracted data in excel and be able to run the Macros. Presently I open the extracted data and also open the master macro-enabled file to access the macro.

View 1 Replies View Related

Macro To Convert Text To Column?

Jul 10, 2013

I am facing difficulty in creating a macro which will convert column A text into 2 separate columns (A & B) with tab & colon as the delimiters.

View 8 Replies View Related

Macro To Convert Text 'dates'

Jul 21, 2008

I am trying to convert text 'dates' like Sat. 1/05/2007 to real dates. I need to find all 'date' cells in range B4:B100 (they are filled in yellow), strip off the offending text (i.e. Sat.), and use DateValue to turn the rest into a proper, numerical date in the ddd mm/dd/yy format, arial, bold, 10pt, and centered in place.

I've spent days trying to write this macro. I've had help from experts in forums, but whenever I need to make any slight modification, a trainwreck ensues. Please see the code below.

View 10 Replies View Related

VBA For Automatically Grouping Rows Based On Text

Jul 7, 2009

I have a pivot table (vendor spend report) which has over 7000 rows of data. There are 38 vendors (some vendors appear multiple times i.e. Accenture Itay, Accenture Germany, etc.). Vendors names are in column B.

I need to have the VBA script search for each of the vendors (and related names) and group them together. Also, last one is for all the MISC. vendors which need to be group together (one's that dont belong to the 38 managed vendors).

Also, I need to rename the Group for each one; rather than Group1, I need to name it "Accenture All" etc...

View 7 Replies View Related

Excel Macro To Convert Text To Number

May 16, 2014

I have a very large exported data base to excel. See the Attachment. I have columns on the left with text that needs to stay as text, and rows at the top with dates. These are my filters to sort and view my data. The current problem I am having is some of the quantities in the bulk of my spreadsheet are coming in as text that need to be converted to numbers (that stupid green triangle in the upper left hand corner). I already have developed a macro to format, sort, extract, and place the data so it's more manageable to look through. I need to get rid of this convert to number error before running this macro.

I am looking to develop a macro that will find each of these "convert text to number" errors and convert the text to number. So far I have been unable to find a starting point.

The sample attached is only 1% of the actual size of the spreadsheet, and my exported data base is variable in size.

The only solution I have at the moment is to go to the bottom of my spreadsheet, find the last error, and highlight everything above and done one convert to number.

Sample.xlsx

View 3 Replies View Related

Macro To Convert Text To Number Without Rounding

Mar 27, 2014

This is what I have so far.

Code:

Range("L:L").Select
With Selection
Selection.NumberFormat = "General"
.Value = .Value =
.NumberFormat = "0.0"

[Code]...

The .NumberFormat = "0.0" is newly added and doesn't work.

View 9 Replies View Related

Convert Dates To Text Format Using A Macro

May 16, 2007

Is there a way I can convert dates to text in a CSV file (opened via excel) using a macro?

Currently I have excel recognised dates in the first column of the format dd-mm-yyyy and a corresponding values in the second columns.

I know once I have the file open I can enter the following formula in an adjacent coloum "=text (A2, "MMM-YYYY") but I need to change the format in the existing date feild and not create a new coloum. Sure I could copy and paste the new formatted dates into the cell, but in terms of what I need to do, this is not practical as I several of these CSV files that I need to query and extract data from daily using a macro.

The macro is not currently working because the date format is wrong. I need it to appear as MMM - YYYY. When you view the date in excel it must appear like this (as it would appear in say microsoft word) and not with the underlying date format.

View 9 Replies View Related

Convert Text To Long Number Macro

Aug 9, 2006

I have a range of numbers stored as text. I need to convert them to long numbers using vba. I tried typing a simple number = clng(a2), but that didnt work. Can someone help me with A) the right formula and B) the proper end(xlUp) format.

View 9 Replies View Related

Macro That Will Clear Contents Of Cell Based On Format Of Text In Adjacent Cell

Feb 18, 2009

Been racking brain, searching through the forum here, and my Excel 2003 Bible all day trying to figure out this problem to no avail. I would like to clear the contents of any cell in a given range if the cell immediately to the right of is formatted as bold.

View 2 Replies View Related

Macro That Will Highlight Cell And Four Rows To Right Based On Text In Cell

Aug 6, 2014

I have a spreadsheet where if Cell A2 says "Deposit", Rows A2-E2 would be formatted with a Blue background.

I've tried conditional formatting, but I can't built it into a Macro (I can't make it run), and it only highlights the cell that has that value. I also tried having the spreadsheet filter down to only the values I want highlighted, then highlighting all cells and un-filtering the column- this didn't work either.

It would basically say :

If (any cell in Row A) has text = "Deposit" (it needs to be exact, it can't be "containing"), set cell with the word "Deposit" and 4 cells to the right as Blue (I'm not picky about the color).

View 10 Replies View Related

Display Image Based On Image Name In Cell

Sep 4, 2007

Is there a way to have image box display an image with a name matching data from a cell? example: if I type "hello" in cell a1, Image box will load image named "hello". And display new images by changing the name in cell a1. Note: the images will be located in a permanent folder.

View 3 Replies View Related

Add Text Based On Part Of Another Cell Text

Oct 16, 2006

I have been working on this worksheet part of which is attached herewith. I would like excel to automatically enter Updated/Inserted in column B against Individuals' names as per the instructions given in column A. For example: As per instruction in A9, B13:B16 should show Updated. I have tried to use the nested if function, but it does not work as I want it to. Also as I am not used to macros or VBA codes, could this problem be solved with formulas?

View 2 Replies View Related

Excel Text Search Through Different Types Of Text And Action Based On Text

Oct 14, 2008

1. Search an excel sheet "column" for a particular type of text and insert values based on that text (if found) in another column.

e.g I have column A1 to A10 with different types of text. I would like to search for the keyword "Risk is high" OR "Risk=High" for each cell in the column and insert a "1" if found beside it's corresponding "B" column. If not found, I would like to insert a "0".

So, if the text "Risk is high" OR "Risk=High" was only found in A6, I would like B6 to be "1". Rest of the values in the B column would be "0's", since the text was not found in any of the other cells.

View 10 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved