»
 

Go Back   ResellerRatings Store Ratings > ResellerRatings Forums > Tech Support

Reply
 
LinkBack Thread Tools Display Modes
Old 12-05-2003, 12:34 PM   #1 (permalink)
Registered User
 
Join Date: Dec 2003
Posts: 3
aparness is on a distinguished road
EXCEL HELP

I have a excel sheet in which i have 4 columns ( A, B , C, D)
In Column A I have 4 categories like the following one.

shipping cost : 60

deposit : $
return : $

Profit : $

What I have to do is get the shipping cost which is 60 here then make the calculations like the following and write the result back to the same cell in the same format as the original like here under

Shipping cost : 60

deposit : $ 60*0.50
return : $ 60*.25

Profit : $ 60*0.10

there are 800 rows and every cell in Column A's shipping cost changes. Also I should not change Column B, C and D.

Please help me with a VB Macro for this.

aparness is offline   Reply With Quote
Old 12-05-2003, 12:46 PM   #2 (permalink)
Registered User
 
Join Date: Oct 2001
Location: TOO close to Wash DC
Posts: 7,956
vass0922 is on a distinguished road
no need for a macro

A1 = Shipping Cost
A2 = Deposit
A3 = Return
A4 = Profit

A1 = Value of shipping cost
A2 = "=A1*.5"
A3 = "=A1*.25"
A4 = "=A1*.10"

Then select the whole 800 records, and "Fill" the formula (think its in edit menu

That help?

Welcome to TechIMO
__________________
<< Insert exceedingly large and overly verbose message of how 1337 you are here including full specs of every vehicle you've ever driven and PC you've owned >>

Last edited by vass0922; 12-05-2003 at 12:58 PM.
vass0922 is offline   Reply With Quote
Old 12-05-2003, 12:59 PM   #3 (permalink)
Registered User
 
Join Date: Dec 2003
Posts: 3
aparness is on a distinguished road
Vass0922,
Thank you for your repply, may be I was not clear on my question. The shipping cost, Deposit, Return and Profit are all in on cell that is A1. The A2 cell has a different value so the proposed solution will not work. I appreciate your help.
I need to have a macro to run through the entire spread sheet.
aparness is offline   Reply With Quote
Old 12-05-2003, 01:10 PM   #4 (permalink)
Registered User
 
Join Date: Oct 2001
Location: TOO close to Wash DC
Posts: 7,956
vass0922 is on a distinguished road
You can parse it out as well
InStr function will parse out text... can you give us an idea of exactly what a cell would like like? how is each value delimited?
__________________
<< Insert exceedingly large and overly verbose message of how 1337 you are here including full specs of every vehicle you've ever driven and PC you've owned >>
vass0922 is offline   Reply With Quote
Old 12-05-2003, 01:29 PM   #5 (permalink)
Registered User
 
Join Date: Dec 2003
Posts: 3
aparness is on a distinguished road
Vass,
I am on it, I could get the values from a cell now after manipulation I want to right is back to the same cell.

the delimiter is ":"

followin is the test code I am working on right now.

Sub test()
Dim Temp As Integer
Dim Str As String

Str = (Cells(1, 1).Value)
Temp = InStrRev((Cells(1, 1).Value), "/")
MsgBox Mid(Str, (Temp + 1), 3)
MsgBox Mid(Str, 1, Temp)

End Sub
aparness is offline   Reply With Quote
Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Most Active Discussions

Recent Discussions

All times are GMT -6. The time now is 10:21 AM.