VBA - Align Image To Right Margin?
Jun 1, 2013
Using VBA, how would I move an existing shape object over to the righthand margin?
I suppose what I need is something like:
VB:
ActiveSheet.Shapes("Picture 1").Left = activesheet.margin.right - ActiveSheet.Shapes.("Picture 1").Width
But how do I find "activesheet.margins.right"?
View 1 Replies
ADVERTISEMENT
Mar 18, 2014
I need to link an image to a cell value and display the selected image in a new sheet of the same excel. I am attaching samplefile for easy reference. The requirement is, from the workout sheet when I select from drop down list, then the corresponding cell value appears in Parameter sheet in C9 cell.
There are four images copied in Parameter excel. The given image has to be selected and linked to the C9 cell value. Based on the selection that particular image should be shown on Sample Picture sheet. Here based on the selection only the image should reflect here.
View 12 Replies
View Related
Nov 4, 2013
I need to find an easy way to locate an image on my server and upon selection rather than inserting the actual image I need to insert the image path. e.g. "s:imageshighresgreen1234.jpg"
View 3 Replies
View Related
Oct 26, 2011
My workbook simply has multiple columns of data which will be summarized visually in a tag cloud (I have the tag cloud part taken care of already creating either a jpg or png, I simply have to change the extension within a batch file to change between picture formats)
I need to have the tag cloud image display and update depending on which column the user would like to summarize (for now I have simplified the issue by only having one of the data columns in my workbook, and will worry about the user selection of the data column to be summarized later).
My Main Question:
Focusing on the image display and updating now, whether it be an ActiveX Image Control or any other way. I've been playing around manually before I try and code it and I can not get either a jpg or png file to attach to the ActiveX control (both of which cause an Invalid Picture Message).
The file name can stay the same if need be and for now I think/assume that'd be easiest (I have my Tag cloud generator just replacing the previously existing image file of the same name).
Would ActiveX control be the way to go for this dynamically changing image?
View 9 Replies
View Related
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
Aug 8, 2006
I have a dataset that includes the path and optionally an HTTPS URL to an image. Is it possible to embed this image in a cell?
Short of that what might be some other options?
View 11 Replies
View Related
Oct 9, 2007
is there a way to load an image out when u type the image name in the textfield.
Example when I type in my name it load my image out beside the name.
View 14 Replies
View Related
Jan 22, 2012
I have a number of image controls on a user form, each being loaded with an image from file.
Image1 being loaded with a picture of a bus image2 being loaded with a picture of a school
And so on
Now what I am trying to do is when that image is clicked the name of that image is passed to a textbox
So the action would be
1 image of bus loaded into image control1 , the name of that image being bus.jpg
2 image is clicked
3 the name bus.jpg appears in a text box
Here is what I have so far
Code:
Private Sub Image1_Click()
DataInput.TextBoxItem.Value = bus.jpg
DataInput.TextBoxItem.Value= Image1.Name - this does not work
End Sub
Which works but as you can see this is static, as I have supplied the value , were as I would like the clicking action to pick up the name of the jpeg being displayed
So expanding upon this if say image1 is loaded with say a picture of a car instead of a bus
LValue4 = "E:Car.jpg"
Image1.Picture = LoadPicture(LValue4)
Now when it is clicked the name of the image being displayed in image control1 would be Car.jpg
And it is this value I wish to transfer to a text box for now will do more with it later
In addition to this I am not sure if the best idea is to have a number of image controls and load each with an individual picture or have one image control and swap the picture by clicking a command button
View 3 Replies
View Related
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
Aug 15, 2006
I have events in column1 and ratings in column 2. The ratings are not sorted.I column 3 I want print the difference between the highest rating in event 1 and the second highest e.g. in the attached sheet column 3,rows 2 to 7 will contain 13.9. Similiarly for event 2 etc down my full sheet of 1200 events.
View 9 Replies
View Related
Apr 20, 2014
I put my margin in G6 of the data sheet and the cost are the numbers on the Mail Rates sheet.
cost/(1-G6) and then round result up to next .25
=VLOOKUP(Calculator!E6,'Mail Rates'!A2:D32,Calculator!D6+1,FALSE)
I am using the vlookup above to bring the mail rates to a calculator. I want to add a margin to the mail rates before they reach the calculator.
The margin amount is in G6 of the "data" sheet and the margin formula is "mail rate"/(1-G6)
I would then like to round the result up to the next .25 dollar
View 3 Replies
View Related
Jan 14, 2008
I am trying to display an image ("image") on an image control ("Image1") placed in a worksheet ("Sheet1"). The problem is that I want this action to take place when I press a button in a user form. I am trying to use the following code, but it seems that VBA does not recognize the image control ("Image1") in the worksheet.
Private Sub cmdDisplayImage_Click()
Dim image As Variant
image = ThisWorkbook.Path & "sun.jpg"
Sheets("Sheet1").Activate
Image1.Picture = LoadPicture(image)
End Sub
View 2 Replies
View Related
Oct 17, 2013
This is the Case:
I Produce something with a €2000 cost price. this is variable.
I Sell it for lets say € 2500,- to someone this is also a variable.
That's makes a Profit of € 500,- on the sale. This is 125% revenue
Until here, no problem using a spreadsheet. but now the difficult part.
I have to split of the 25% margin over 2 persons. This has to be done as follow:
a. The first slice is 2,25 for Mr A
b. The second slice is 15,00 for MR B
c. The Third Slice is 2,75 for mr A
This divides 20 of the 25 % over 2 persons. Still 5% margin remains
The last 5 is devided as follow:
d. 85% for MR A
e. 15% for MR B
So in this case:
MR A receives: a:€45 + c:€55+ d:€85 = €185,-
MR B receives: b:€250 + e:€15 = €265,-
The tricky part is when the margin is less than 20%.
for example; If the margin is 14%. than only slice a. and a part of slice b. an be paid off. so in that case;
MR A receives: a:€45 + c:€0+ d:€0 = €45,-
MR B receives: b:€230 + e:€0 = €230,-
Any formula which calculates the revenue for MR A and B automatically based on only the cost and selling price.
A B
1 Cost price - €2000
2 Selling Price - €2500
3 MR A - €185,-
4 MR B -€265,-
View 1 Replies
View Related
May 27, 2008
I have the margin and I have the sale price. How do I figure out the cost?
View 12 Replies
View Related
Mar 1, 2012
I'm trying to calculate a weighted average gross margin but am having difficulty because I've instances of positive cost of sales and negative revenue. On a line by line basis I've had no problems calculating the margin but when it comes to calculating the weighted average margin as a whole I come unstuck. Looking at the data below (A1:D14) you can see that the margin should be somewhere between 90-99%.
Total RevenueCost of SalesGross ProfitGross Profit %4,805(449)4,35690.6%4,992(330)4,66293.4%3,467(246)3,22192.9%4,974(317)4,65893.6%3,873(130)3,74396.6
%3,756(258)3,49893.1%3,955(128)3,82796.8%2,872(59)2,81397.9%1,401(1)1,40099.9
%(10,987)21,45810,47195.3%3,042(172)2,87094.3%2,748(40)2,70998.6%2,682(172)2,51093.6%
View 4 Replies
View Related
Sep 10, 2008
I have a table with daily sale entries and margins. I want a formula to calculate my sale and margin between certain hours.
The original data table is below.
Data table:
ABCDEF1DateHoursQuantityUNIT PRICESALEMARGIN201/07/0810:351-4,00-4,00-4,00301/07/0810:35122,0022,0010,05401/07/0810:5016,006,001,80501/07/0810:5016,006,001,80601/07/0811:0313,803,802,00701/07/0811:0316,806,801,67801/07/0811:0415,005,002,64901/07/0811:0733,339,993,901001/07/0811:0735,0015,008,071101/07/0811:1016,006,003,971201/07/0811:1115,605,602,971301/07/0811:1316,006,003,971401/07/0811:1412,602,601,831501/07/0811:1412,602,601,781601/07/0811:21111,6011,606,401701/07/0811:2226,0012,006,821801/07/0811:2413,503,501,471901/07/0811:28111,6011,603,952001/07/0811:4115,605,602,902101/07/0811:4115,605,602,902201/07/0811:42118,8018,806,722301/07/0811:4417,807,801,612401/07/0811:4523,507,002,942501/07/0811:4712,002,001,532601/07/0812:0113,203,201,84
The results I need:
ABCD1DATESALE BETWEENSALEMARGIN201/07/200810:00 TO 11:0030,009,65301/07/200811:00 TO 12:00148,8970,04
View 9 Replies
View Related
Dec 1, 2008
I need to work out the profit margin from goods i sell.
I have cost A2
Pack size A3
Net cost A4
Tax A5
Gross price A6
I need to work out the margin between A5 and A6.
View 10 Replies
View Related
Nov 16, 2011
I am trying to set up a spreadsheet to calculate margin on stock positions.
There are 3 tiers, based on number of shares. My example:
400 shares in held in total.
1st 200 shs margin at 10%.
next 100 shs margin at 20%.
everything above 300 shs (ie 100) margin at 30%.
The 400 shs may be made up in any number of ways, (ie lots of smaller amounts) and i need a formula to give me the margin amount on each position, flexible enough for when positions are added / removed.
I've been looking at SUMPRODUCT but can only seem to make it work for the total, not each individual position.
View 9 Replies
View Related
Jan 25, 2005
I have a price sheet for my store in Excel. I want to make the spreadsheet easy for my sales people to use to calculate differing profit levels. I'd like to embed a drop down box at the top (I can do that part) that they can select, say, 10%...20%...30% markup. I know how to do that basic formula. I don't understand how to link that formula to a number selected in a drop down box. I don't know how to make the prices change based on the value selected in the drop down box. I can't do vlookup because it's about 1500 lines long. Also, it doesn't have to be drop down box based--that's just the idea in my head. I tried just making a macro that would run when they hit the button, but when the macro runs it switches the focus back to the top, very annoying if you were looking at prices on cell D811.
View 7 Replies
View Related
Oct 8, 2008
I'm trying to build a formula to form a price-list. I have some basic prices from a supplier and want to build my prices with a simple rule: the higher the basic price is (column A), the lower my profit margin (in %) should be (column B). Example:
Basic value is $50, my price is $75 (50% margin)
Basic value is $100, my price is $130 (30% margin)
Basic value is $150, my price is $172,5 (15% margin)
And so on...
I forgot most of what I've learned on Excel at my university (long time ago...), so I tried to do it by using simple thresholds, with "if" function:
View 5 Replies
View Related
Nov 29, 2012
I am looking for a formula which will calculate a sell price with 20% profit after taxes and costs. I need it to factor in a fixed shipping cost (eg £10), a 7.5% Amazon fee of the sell price, then 20% tax of the sell price. I currently have a formula which essentially does this but as I'm not good with Excel it requires me to input all the values every time which is not practical considering our large inventory.
View 3 Replies
View Related
Nov 17, 2009
I have a section of my program that asks for board scores (point value is 6-10 in increments of .5) I have set up a data validation so that users can only enter those specific values. Problem is, none of the values can be more than 1 point from each other. (the part I have yet to figure out)
Example, if the first value is a 6.5 the second is 7.0 and the third is a 9.0, I need the data validation to display an error because the 9.0 is beyond the one point spread.
Summary: Display an error message if any of the points are more than 1.0 point from another.
View 7 Replies
View Related
Feb 3, 2014
I don't want to appear too expensive or give my products away. If I have a part that costs me £20.00 plus vat i.e £24.00. I have to include carriage £5.00 plus vat i.e £6.00. Ebay fees for car parts including PayPal is 10%. How much would I charge to retain 20% percent after all fees and charges and what formula would I use to make the calculator.
View 2 Replies
View Related
Mar 12, 2009
I want to restrict the value entered on a sales sheet to force the value to be over 15% margin. In column M you enter a value in column N it report the margin. I want to force the value in M to give a minimum 15% in column N or report an error.
View 3 Replies
View Related
Sep 12, 2013
I need to develope a macro for Excel to calculate desired profit margin depending on our cost of each item. Here's the scenario.
A1: landing cost
If 0
View 4 Replies
View Related
Jun 23, 2010
Is there an excel formula that can calculate a proposed selling price by entering a desired profit margin percentage and knowing the cost of goods sold?
I know that gross profit is calcualted by subtracting the cost of goods sold from the selling price and that the gross profit margin is calculated by dividing gross profit by the selling price..but not coming up with a way to back out a selling price by just knowing the cost of goods sold and entering a desire gross profit margin?
View 9 Replies
View Related
Jan 8, 2014
So I can easily put together a formula that maintains a consistent markup price across varying costs. Is there a formula that will give me a consistent gross margin % as I drag down a series of costs?
So if the cost is 158 a 42% mark up would be 224.36 but the Gross Margin % is only 29.58. I want to be able to hit a 42% mark up across the board.
View 5 Replies
View Related
Nov 20, 2008
I have several lines of code written in VBA without any tabs. All the lines of code are starting in same column.
I need to align the code, so that it is easy to understand.
View 9 Replies
View Related
Jun 3, 2014
I would like to align a group of columns against another group of columns.
Columns G-L will not be changing. They have a certain amount of info I want to align with columns A-F
There are 30000 items in G-L and only around 3000 so far in A-F
Weekly I will import and reorder A-F and then want to realign them with G-L
This is a link to a sample of the original file: [URL] .....
This a link to how I wan the order to be : [URL] .....
As you can see there are many more rows in columns G-L
I will update columns A-F weekly and then want to realign G-L
View 2 Replies
View Related
Jul 25, 2014
I need a single cell to contain two elements, one left aligned and the other right aligned.
Result would look something like this, LeftText aligned to the left side of the cell and RightText aligned to right side of the same cell.
LeftText {all of the white space here between two text values} RightText
Merging columns is not an option; both values must be in same cell. Both text values vary in length with each run of the code.
All I can do as of now is plug in a bunch of spaces that will approximate the open space between the two values.
View 9 Replies
View Related